Install MySQL
# Cd/usr/down
Run ls-L to list the files in the current directory.
# Groupadd MySQL
# Useradd-G MySQL (if you select "Install all" when installing the toolkit, the commands for adding these two user groups will prompt that the user group already exists)
# Tar-zxvf mysql-5.0.37.tar.gz
# Cd mysql-5.0.37
#./Configure -- prefix =/Server/MySQL -- With-charset = gb2312 -- With-extra-charsets = GBK, gb2312
The prefix parameter specifies the MySQL installation directory. We will install it in the/Server/MySQL directory.
# Make
# Make install
#/Server/MySQL/bin/mysql_install_db -- user = MySQL
# Cp support-files/my-medium.cnf/etc/My. CNF
Copy the MySQL configuration file to the/etc/directory and save it as my. CNF
# Cp support-files/MySQL. Server/etc/rc. d/init. d/mysqld
# Chmod 700/etc/rc. d/init. d/mysqld
# Chkconfig -- add mysqld
# Cd/Server/MySQL
Go to the MySQL installation directory.
And run chown-r root.
Note: Do not miss "."
# Cd Server
# Chmod 750 mysql-R
# Chgrp MySQL mysql-R
# Chown MySQL/var-r // create a var directory to load the error file. If the installation path is -- prefix =/Server/MySQL, query the VaR folder in the MySQL directory, if no installation path is specified, it is installed under/usr/local/by default. var is created here.
#/Server/MySQL/bin/mysqld_safe -- user = MySQL &
Start MySQL
When mysqld ended appears, click "enter" to return to the command line.
# Bin/MySQL-u root-P
Log on to MySQL
The system will prompt you to enter the password. Because the password is not set during installation, the default password is blank. Click Enter to enter.
The following prompt indicates that MySQL is installed and can be used.
Welcome to the MySQL monitor. commands end with; or \ G.
Your MySQL connection ID is 65
Server version: 5.0.37-log Source Distribution
Type 'help; 'or' \ H' for help. Type '\ C' to clear the buffer.
Now let's test MySQL.
Enter selcet version ();
View MySQL version
Note: The SQL statement must end ";"
Show mysql-5.0.37
Mysql> show character set;
Check whether the GBK and gb2312 fonts are installed. If not, restart./configure & make install.
Quit;
The basic MySQL configuration is complete. to modify the configuration parameters as needed, refer:
Http://www.cnblogs.com/ovliverlin/articles/832648.html