MYSQL Quick Start

Source: Internet
Author: User
Tags mysql commands


MYSQL Quick Start 1. manually start MYSQL: directly run the c: \ mysqld command. 2. As a service method: run the c: \ mysqld-nt -- install command to install mysqld-nt as a windows service. After that, it runs automatically whenever windows starts. Mysqld-nt is a MySQL server that supports named pipes. Run c: \ mysqld-nt -- remove to delete the service. To manually start or close the service, run the c: \ net start mysql and c: \ net stop mysql commands. 3. command Line usage 1. Connect to the local server or the MYSQL database mysql-u root-p Database Password mysql-u root-h 192.168.0.1 mysql.exe on the MYSQL BIN directory 2. Check what database mysql> show databases on the server; by default, MYSQL and TEST Databases are installed. If other databases exist, they are user-created databases. Www.2cto.com 3. create database egocbd2010 as the MYSQL database parameter; 4. create a database, specify the user and password, and grant all on mydb permissions. * TO NewUserName @ localhost identified by "ps *****" 5. import data TO the SQL file mysql> use egocbd2010; (database) and then use the source command, the following parameter is a script file (as used here. SQL) mysql> source/data/MYDB. SQL www.2cto.com 6. view the specified database mysql> use MYDB. We will enter the MYDB database. 7. Check the data tables mysql> show tables in the database; 8. create a new table in the MYDB database; mysql> create table a (dbname text); All Right, Let's A new table named a is created. The table contains only one field, the field name is dbname, and the text is text. Www.2cto.com 9. insert mysql> insert into a values into the table; 10. view the parameters of the specified database table and see what mysql> select * from a in Table; 11. The output table is a VBS script file mysql> select * from a into outfile "file disk storage path \. vbs by Cai lei

Related Article

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.