MYSQL common operation commands

Source: Internet
Author: User


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;
 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.