Mysql installation-free instructions

Source: Internet
Author: User
Tags mysql host


Mysql installation instructions 1> extract the compressed file mysql-noinstall-5.1.6-alpha-win32.zip to a directory, set MYSQL_HOME in the environment variables, and add % MYSQL_HOME % \ bin to path. 2> Create my. ini configuration file, content: [mysqld] # Set basedir to mysql installation path basedir =... \ mysqldatadir =... \ mysql \ data my. the INI file is placed under the system file. 3> start and stop mysqlmysqld.exe --install(install Windows Service, uninstall and use mysqld.exe -- remove) start: net start mysql stop: net stop mysql www.2cto.com 4> connection mysql format: mysql-h host address-u user name-p User Password Example 1: connect to mysqlmysql-uroot-p on the local machine Example 2: connect to mysqlmysql-h110.110.110.110-uroot-pabcd123 on the remote host 5> exit mysql Command exit (Press ENTER) or quit (Press ENTER) 6> Change password format: mysqladmin-u username-p old password new password example: Add a password ab12 to the root user. First, enter the directory mysqlbin in DOS, and then type the following command mysqladmin-uroot password ab12. Note: because the root has no password at the beginning, the old-p password can be omitted. 2. Example 2: Change the root password to djg345. Mysqladmin-uroot-pab12 password djg345 contains commands in the mysql environment, ending with a semicolon. 7> Add the new user format: grant select on database. * to username @ login host identified by "password"; Example 1: Add a user test1 whose password is abc so that he can log on to any host, all databases are permitted to query, insert, modify, and delete databases. First, use the root user to connect to mysql, and then type the following command: grant select, insert, update, delete on *. * to test1 @ "%"

Identified by "abc"; Example 2: Add a user test2 with the password abc so that the user can only log on to localhost, you can also query, insert, modify, and delete the database mydb (localhost refers to the local host, that is, the host where the mysql database is located), so that the user knows the password of test2, you cannot access the database directly from the internet. You can only access the database through the web pages on the mysql host. Grant select, insert, update, delete on mydb. * to test2 @ localhost identified by "abc"; www.2cto.com 8> show database list show databases; 9> show database data table use mysql; // database name show tables; 10> display the describe table Name of the data table structure; 11> create database name; 12> create table use database Name; create table Name (...... reference article: http://www.ej38.com/showinfo/mysql-107727.html installation and configuration http://dev.mysql.com/doc/refman/5.1/zh/sql-syntax.html MySQL syntax
 

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.