MySQL's Down right run
Create a new user like MySQL tutorialNET user MySQL Microsoft/addnet localgroup users Mysql/delDoes not belong to any groupIf MySQL is installed in D:mysql, then, give MySQL Full control of the permissionsThen in the system
I want to connect to a database on my colleague's machine. In the account password everything is correct situation, or encountered a few problems.
1, FirewallBy telnet colleague Machine IP 3306, the result is not even on. have dealt with similar
The MySQL database needs to be used in the project, and the following is how to access MySQL
Here I use the Mac to develop the first need to download MySQL
Address: http://dev.mysql.com/downloads/mysql/
Refer to this installation http://dev.mysql.
Create a new user under 1,mysql
Grammar:
1.create user username identified by ' password ';
Example: Create user Xiaogang identified by ' 123456 ';
The newly created user, by default, does not have any permissions.
2. How to assign permissions
The number of connections exceeds the value set by MySQL and is related to both max_connections and wait_timeout. The larger the value of the wait_timeout, the longer the idle wait for the connection, which causes the current number of connections
MySQL to add new users can be done in two ways:
1. By way of the grant statement, we will explain this in the MySQL permissions below, which is simply an example.2. Direct operation of the MySQL authorization form (this method is now basically not
Using commands is a commonly used mysqldump to operate (mysqldump commands are located in the mysql/bin/directory)
The Mysqldump tool has a number of options, some of which are listed below:
Option/option action/action performed
--add-drop-table
MySQL default maximum number of connections is 100, you can use the following command on the MySQL client to view
Mysql> Show variables like ' max_connections ';
This command will result in output similar to the following:
+-----------------+-----
FileName mysql_data_backup.sh (requires permission to execute)
MySQL database table automatic backup Shell Script (second edition)
Call Example:
The code is as follows
Copy Code
mysql_data_backup.sh
Include
Note--skip-grant-tables can turn off permission validation
1. Modify the MySQL configuration file under [mysqld] Add a line of configuration--skip-grant-tables, restart MySQL
2. Find MySQL Directory bin directory, run command line mysql-u root
3.
To do a functional requirement today, sort out the first 10 and inconsistent data from the table, such as the following values in table A:
The code is as follows
Copy Code
Mysql> select * from A;+----+----------+| ID |
The specific solution process is as follows
1. Delete all PID process of MySQL
2, start MySQL. If the boot is normal, OK, if it is not normal to see the MySQL log file
3, look at the log file, see the error information according to the error
There is a scene, a tens of thousands of-record table, the primary key is ID, and I want to take a few records with ID 30,20,80,40 from the table.
Note that 30,20,80,40 is the order I expected, and I want MySQL to return records in this order.
So
First, limit the concurrent processing of innodb. If innodb_thread_concurrency = 0 can be changed first to 16 or 64 to see machine pressure, ifVery large, first changed to 16 to let the machine pressure down, and then gradually increase to adapt to
User Authorization method
You can add a new user by issuing a GRANT statement:
The code is as follows
Copy Code
shell> MySQL--user=root MySQLMysql> GRANT all privileges in *.* to Monty@localhostIdentified by ' something
Php + mysql image input and outputI have read the online example ~ Used ~ No problem found when images are imported to the database ~ However, the output always reports an error ~The code is as follows:Database creation:Create table Images (PicNum
When writing a database program to access MYSQL, do you feel very troublesome: a large set of functions and parameters, and check the call results, the biggest headache is that every program should contain the database name, user, password, and so
I. Software preparation:Php (5.1.2): http://www.php.netMysql (5.0.19): http://www.mysql.comZend optimizer (2.6.2): http://www.zend.comPhpmyadmin (2.8.0.2): http://www.phpmyadmin.netSuppose c: The system disk for your current operating system. If
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