Use yum in linux to install mysql 1. Check whether the installation has been installed: yum list installed mysql * rpm-qa | grep mysql * check whether there is an installation package: yum list mysql * install the mysql client: yum install mysql server: yum install mysql-server yum install mysql-devel www.2cto.com 2. Start & stop database Character Set set mysql configuration file/etc/my. add default-character-set = utf8 to cnf to start mysql service: service mysqld start or/etc/init. d/mysqld start: chkconfig-add mysqld, check whether the startup setting is successful chkconfig -- list | grep Mysql * mysqld 0: Disable 1: Disable 2: Enable 3: Enable 4: Enable 5: Enable 6: Disable stop: service mysqld stop2, log on to create a root administrator: mysqladmin-u root password 123456 www.2cto.com login: mysql-u root-p enter the password. Forgot password: service mysqld stop mysqld_safe -- user = root -- skip-grant-tables mysql-u root use mysql update user set password = password ("new_pass ") where user = "root"; flush privileges; 3. remote access to the port number of open firewall mysql adds permissions: A New host record "%" is added to the user table in the mysql database ", the user is "root ". 4. Several important directories of Linux MySQL: www.2cto.com database directory/var/lib/mysql/configuration file/usr/share/mysql (mysql. server commands and configuration files) related commands/usr/bin (mysqladmin mysqldump and other commands) Start the script/etc/rc. d/init. d/(directory for starting the script file mysql)