In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
one。 Create users and paths
1. Create MySQL user groups and users
# groupadd mysql
# useradd-g mysql mysql
two。 Create a data storage path
# mkdir / data/dbfile
# chown-R mysql.mysql / data/dbfile
two。 Install mysql 5.x.x.tar.gz
1. Compile
Default character set
Extended character set
Install Innodb
Specify the data storage path
Specify the system profile path
# / configure-- prefix=/data/mysql5-- with-charset=utf8-- with-extra-charsets=all-- with-plugins=partition,heap,innobase,myisam-- enable-thread-safe-client-- without-docs-- with-pthread-- enable-static-- with-big-tables-- without-debug-- localstatedir=/data/dbfile-- sysconfdir=/etc-infodir=/data/mysql5
# make
# make install
two。 Copy my.cnf
# cp mysql-5.1.31/support-files/my-medium.cnf / etc/my.cnf
3. Initialize the database
# mysql5131/bin/mysql_install_db-user=mysql
4. Start the MySQL service
# mysql5/bin/mysqld_safe-- user=mysql &
5. Stop the MySQL service
# mysql5/bin/mysqladmin shutdown
6.MySQL tuning my.cnf
Include Innodb configuration
7. Delete old Innodb log files
# rm / data/dbfile/ibdata1 ib_logfile0 ib_logfile1
8. Restart MySQL
9. View Innodb running status
Mysql > show variables like'% innodb%'
+-+
| | Variable_name | Value |
+-+
| | have_innodb | YES |
+-+
three。 Create a database
Mysql > GREATE DATABASE aa
[view aa default character set]
Mysql > show table status from test like'% aa%'G
* * 1. Row *
Name: aa
Engine: InnoDB
Version: 10
Row_format: Fixed
Rows: 8
Avg_row_length: 7
Data_length: 56
Max_data_length: 1970324836974591
Index_length: 1024
Data_free: 0
Auto_increment: NULL
Create_time: 2009-04-13 10:28:14
Update_time: 2009-04-13 11:51:37
Check_time: NULL
Collation: gbk_chinese_ci
Checksum: NULL
Create_options:
Comment:
four。 Set the MySQL service to boot automatically
Manage mysql services via service mysql start | stop | restart
# cp support-files/mysql.server / etc/rc.d/init.d/mysqld setting enables mysql to run automatically every time it starts
# chkconfig-add mysqld
# chkconfig-- level 345 mysqld on
# service mysqld start / / start mysqld service
five。 Set up global login
Log in directly via # mysql
Export PATH=$PATH:/data/mysql5/bin
[@ more@]
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.