the command to log in to MySQL is mysql: mysql [-u username] [-h host] [-p[password]] [dbname]
MySQL directory:
Database directory:/var/lib/mysql/
Configuration file:/usr/share/mysql(mysql.server command and configuration file)
Related commands:/usr/bin (mysqladmin mysqldump and other commands )
Startup script:/etc/rc.d/init.d/(startup script file mysql directory)
Modify mysql login password: usr/bin/mysqladmin-u root password ' new-password '
MySQL start and stop: /etc/init.d/mysql start/usr/bin/mysqladmin-u root-p shutdown
MySQL autostart :/sbin/chkconfig –list/sbin/chkconfig – add MySQL ( added to Autostart list )/sbin/chkconfig – del MySQL ( Delete auto start list )
To add a mysql User:
Grant SELECT on database . * to User name @ Login host identified by " password "
Grant Select,insert,update,delete on * * to [e-mail protected] "%" identified by "123";
backup and Recovery for MySQL:
Mysqldump-u root-p--opt ( configuration item ) ( Library or table ) > Back.sql
Mysql-u root-p ( Library or table ) < Back.sql
MySQL optimization tool
Show status Explain optimize ( allows you to recover space and merge data file fragments , optimize currently only works on myiasm< /c6> and BDB tables )
The basic operation of MySQL