MYSQL common operation commands recently studied PHP and MYSQL development environment, tested the software php5foriis6v2.0.exe which is better than WIN2003 + iis6.0 x86operating system, mainly including php5.25 + mysql5.045 + zend3.3a + phpmyadmin 3.3.0 and other software.
For WIN2008 + iis7.0 x64 bit systems, you can use PHP Manager for IIS 7 on www.iis.net. http://phpmanager.codeplex.com/ Very easy to use. After the environment is properly matched, the commonly used MYSQL operation commands are summarized as follows: www.2cto.com MYSQL system environment variable name MYSQL_HOME variable value C: \ php5 \ MySQL545 variable name Path variable value C: \ php5 \ MySQL545 \ bin; MYSQL common operation commands -- convert to MYSQL directory cd C: \ php5 \ MySQL545 \ bin -- install MYSQL service command C: \ php5 \ MySQL545 \ bin> mysqld-nt -- install -- delete MYSQL service command C: \ php5 \ MySQL545 \ bin> mysqld-nt -- remove -- start MYSQL service command C: \ php5 \ MySQL545 \ bin> net start mysql -- log on to the mysql database C: \ php5 \ MySQL545 \ bin> mysql-u root-h localhost-pEnter password: enter the old password of the root user and press Enter www.2cto.com -- change the password of the root user to the new password C: \ php5 \ MySQL545 \ bin> mysqladmin-u root-p password New password Enter password: enter the old password of the root user-test to log on to the mysql database with the new password C: \ php5 \ MySQL545 \ bin> mysql-u root-h localhost-pEnter password: enter the new password of the root user -- CREATE a DATABASE mysql> create database name; Query OK, 1 row affected (0.03 sec) -- authorize access to the DATABASE mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, alter on Database Name. * TO database name @ localhost identified by 'new password'; Query OK, 0 rows affected( 0.17 sec) www.2cto.com -- authorize access to the database mysql> set password for 'database name' @ 'localhost' = OLD_PASSWORD ('new password'); Query OK, 0 rows affected (0.03 sec) -- query database character encoding mysql> show variables like 'Char % '; mysql> show variables like 'colation _ %'; mysql> show variables like 'character _ set _ % '; -- replace the database mysql> use Database Name; -- create all data tables from the file mysql> SOURCE c:/createtable. SQL; www.2cto.com -- import all data tables from the file mysql> SOURCE c:/tabledata. SQL; -- delete database mysql> drop databse database name; -- exit mysql database C: \ php5 \ MySQL545 \ bin> exit;