Linuxmysql installation-free bitsCN.com
Linux mysql installation-Free Edition
1. mysql download mysql-5.6.10-linux-glibc2.5-x86_64.tar.gz
2. decompress tar-xvf mysql-5.6.10-linux-glibc2.5-x86_64.tar.gz
3. cp support-files/my-default.cnf./my. cnf
Put the configuration file in the decompressed directory or/etc/my. cnf, but it is easier to install it here.
Modify my. cnf and set basedir datadir.
The default-character-set cannot be set in this version. If this parameter is left blank, do not set the character set. the default value is latin1. set the character set when creating a database, I don't know if there will be any problems. it's okay after a simple test.
4. run:/scripts/mysql_install_db -- user = root.
5. start mysql
./Bin/mysqld_safe -- user = root
6. add mysql to the system service:
Cp support-files/mysql. server/etc/rc. d/init. d/mysqld
Modify mysqld and set basedir and datadir
Because mysql is used by default when mysqld_safe is started, and -- user is not specified in the script, you can modify the script by yourself and add the parameter -- user = root to the mysqld_safe command.
Chmod 700/etc/init. d/mysqld
Chkconfig -- add mysqld
Chkconfig -- level 345 mysqld on
Service mysqld start/stop/restart
7. all articles on installing mysql on the Internet say that you want to create a user group and user mysql. it seems that it is not good for general management, and you do not need to create a user.
BitsCN.com