MySQL ==========
Yum install MySQL Mysql-server
Mysqladmin-uroot-predhat Password Westos Modify the local MySQL root password
Mysqladmin-uroot-predhat-h 192.168.0.188 Password westos modify remote 192.168.0.188 mysql server root password
Mysql_secure_installation The first time you install MySQL, this command allows you to set MySQL
Mysql-uroot-predhat log in to the MySQL database from the local computer
show databases; Display Database
Use MySQL; Enter the database
Show tables; Displaying tables in a database
DESC user; View the data structure of the user table
Flush privileges; Refreshing database information
Select Host.user,password from user; Querying the Host,user,password field in the user table
Create Database Westos; Create a Westos database
Use Westos; CREATE table Linux (creates tables, Username,password fields username varchar () not NULL, password varchar (n) not null);
SELECT * from Mysql.user; Query the user table under the MySQL library so
Show tables; Desc Linux;
INSERT into Linux values (' User1 ', ' passwd1 '); Insert a value of username = User1,password = Password1 in a Linux table
Update Linux set Password=password (' Passwd2 ') where username=user1; Update the password for User1 in the Linux table to Password2
Delete from Linux where username= ' user1 '; Delete the contents of User1 in the Linux table
Grant SELECT On * * to [E- Mail protected] identified by ' PASSWD1 '; The authorization User1 password is PASSWD1 and can only query the database locally, so the content
Grant all on mysql.* to [email protected]'% ' identified by ' passwd2 '; Authorization user2 password for PASSWD2 can log in to MySQL from any remote host and can operate on MySQL database arbitrarily
Backup/var/lib/mysql mysqldump-uroot-predhat mysql > Mysql.bak backup mysql library to Mysql.bak
Mysql-uroot-predhat Westos < Mysql.bak restore Mysql.bak to Westos Library
MySQL Password recovery/etc/init.d/mysqld stop
Mysqld_safe--skip-grant-tables & Skip grant-tables Authorization table does not require authentication login to the local MySQL database
Update Mysql.user set Password=password (' Westos ') where user= ' root '; Update Mysql.user The password for the root user in the table is encrypted Westos
/etc/init.d/mysql restart
phpMyAdmin Yum install php php-mysql httpd mysql Mysql-server
Tar jxf phpmyadmin-*.tar.bz2-c/var/www/html mv phpMyAdmin phpadmin CP config.sample.inc.php config.inc.php vim config.in c.php add $cfg [' blowfish_secret '] = ' test ';
/ETC/INIT.D/HTTPD Start Http://192.168.0.188/phpadmin