1. Start Service
Windows DOS Command Window input directive:
To see if a service starts: NET Help services
Start MySQL service: net start MySQL
Stop MySQL service: net stop MySQL
Linux under Bash, enter the instructions:
To view the status of services: Service MYSQLD Status
Start MySQL service: Service mysqld start
Stop MySQL service: Service mysqld stop
2. Landing
mysql-u[here Enter user Name]-p[here to lose password]
3. Forget the administrator password
Stop the MySQL service first
Then enter: Mysqld--skip-grant-tables, at which point the Mysqld service will be started
Enter at command line: Mysql-uroot, log in root without a password
Input: Update mysql.user set Password=password ("Enter your new password here") where user= ' root '
Input: Flush Privileges
Exit, restart MySQL service, login with new password
4. Create a Database
Log in to the MySQL console with the root account
View all databases: show databases;
Creating database: Create DB OpenFire;
Create a database administrator and assign permissions: Grant all on openfire.* to Openfire@localhost identified by "OpenFire"
Switch database: Use OpenFire;
View all tables in the current database: show tables;
5. Simple permission Control
Log on to the MySQL command line with the root user
Add Permissions:
Enter grant all on [Database name + table name can also *.*] to [user name]@[ip address] identified by ' [Password] '
For example: Grant all on admin.* to otalk@172.17.100.156 identified by ' password01! '
The above statement means that the Otalk user can have all the access rights for all tables under the Admin database on the host with IP address 172.17.100.156
Remove Permissions:
Revoke all privileges in admin.users from Otalk@localhost
Mysql5.5 Perfect solution for Chinese problems
Pause the MySQL service and locate the My.ini file under the MySQL installation directory.
Add a sentence under [client]:
Default-character-set=utf8
Change the two sentences under [mysqld]:
Copy Code code as follows:
Character-set-server=utf8
Collation-server=utf8_general_ci
Then restart the MySQL service.
Go to the MySQL command line to view character settings:
Copy Code code as follows:
Show variables like ' collation_% ';
Show variables like ' character_set_% ';
Shows the UTF8 related string, the modification is successful.
Restart the MySQL service and note that the UTF8 format is used when creating tables
Mysql5.5 deletion of log files caused failure to start
Edit MY.CNF
Comment out the following two lines:
Copy Code code as follows:
Log-bin=mysql-bin
Binlog_format=mixed
Restart Mysql,ok.
The above is a small set to introduce the Mysql5.5 installation configuration method and Chinese garbled fast solution, I hope to help you, if you have any questions please give me a message, small series will promptly reply to everyone. Here also thank you very much for the cloud Habitat Community website support!