Use mysqladmin to change the password of your MySQL database

Source: Internet
Author: User
Tags mysql commands pconnect

Use mysqladmin to change the password of your MySQL database

(Http://bbs.zol.com.cn/index20060604/index_124_10469.html) set password for user @ "%" =

Password ("password ");
First, log on:
Command mysql-h123.123.123.123-uroot-p123456
 

Back up MYSQL: mysql-H <ip>-uroot-pwest263mysqlisgoodmysqldump-H Server IP address-u username-P Password

-- Opt database name backup database name example:
Mysqldump-h125.65.76.4-uaheadsoftmysql-p123456 -- opt aheadsoftmysqlbkup. SQL
 

2. Activate database commands
Grant all privileges on databasename. * To databasename @ '%. %' identified by 'Password ';
Flush privileges;

3. MySQL startup commands: net stop MySQL and net strat MySQL.
7. How to remotely repair the damaged MySQL database
C:/mysqlcheck-r-u user name-P Database Password-H server address database name for example: C:/mysqlcheck-r-udemo-

Pdemo-h218.89.170.62 demo
8. How to back up and import MySQL Databases
To back up or import a MySQL database, run the mysqldump and MySQL commands to install MySQL.

The client tool can be found in the bin directory of the installation directory. If you have not installed the tool, you can directly

Bytes.
1) backup server data:
Mysqldump-H Server IP address-u user name-P password -- opt Database Name> Backup Database Name
For example:
Mysqldump-h218.89.170.62-udemo-pdemo -- opt demo> bkup. SQL
This command backs up the demo database on server 218.89.170.62 to the bkup. SQL file in the current directory of the local computer.

In this way, when the database is accidentally damaged or data is lost, the backup file bkup. SQL can be restored.
2) Import SQL data to the MySQL database
Mysql-H Server IP address-u user name-P password-F-D database name <backup file name
For example:
Mysql-h218.89.170.62-udemo-pdemo-F-D demo <bkup. SQL
This command restores the data in the bkup. SQL file to the demo database on the server.
 

This is a problem set by MySQL ~ MySQL Default only has 100 million bytes ~ If more than 100 million bytes exist ~ The above error message will appear
There are two solutions.
1. pconnect is disabled in config. php, that is, $ pconnect = 1 ==> $ pconnect = 0
2. Change it in my. ini (WIN) or my. CNF (UNIX) (if not, add it)
[Mysqld] Set-variable = max_connections = 250
Restart MySQL again ~
Max_connections: when it comes to table cache, you can skip this step ~ [Url]

http://dev.mysql.com/doc/mysql/en/table_cache.html#/url]

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.