Mysql data import related things _ MySQL

Source: Internet
Author: User
Import data directly from the local machine: run the command D: mysql-p * in DOS. press enter and enter the password -----------------------------------------. it is very convenient to provide a tool for you to back up and import data! Please fill in your SQL connection data, user name and password in the backup. php and restore. php files. Download: fun. m The local machine directly imports data:
Run the following command in DOS:
D: \> mysql-p <*. SQL
Press enter and enter the password.
---------------------------------------
A tool is provided to help you back up and import data!
Please fill in your SQL connection data, user name and password in the backup. php and restore. php files
Download tool: fun.my.u517.com/backup.rar
------------------------------------------------------------------------------
Solution to errors during server import:
MySQL version 4.1.8-standard-log
Another MySQL version 4.0.23-standard always fails to recover data. Is this the cause?
How can we solve this problem? we need to export it one by one in phpMyAdmin and then import the new space? Error prompt:
Query Error: create table pw_actions (id smallint (6) unsigned not null auto_increment, images varchar (15) not null default '', name varchar (15) not null default '', descrip varchar (100) not null default '', primary key (id) TYPE = MyISAM f135be10fc
B8159526cf
The URL Is:
Http://XXXX.com/admin.php? Adminj... me = pw_0416_126142Bc

MySQL Server Error: XXXXXXXXX
You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'default CHARSET = latin1 'at line 1 (1064)


Recovery method:
Solution: modify your backup file
Replace

ENGINE = MyISAM default charset = latin1

Change

TYPE = MyISAM



Replace (if any)

ENGINE = Heap default charset = latin1

Change

TYPE = Heap
---------------------------------------------------------------------
Local debugging:
Increase the maximum number of mysql connections

The maximum number of connections in mysql is 100 by default. this value is far from enough for database applications with many concurrent connections.
, You can increase it as appropriate,
Whereis safe_mysqld
Find the location of safe_mysqld, edit it, find the two lines started by mysqld, and add the parameter
-O max_connections = 1000
For example
--- Safe_mysqld.orig Mon Sep 25 09:34:01 2000
++ Safe_mysqld Sun Sep 24 16:56:46 2000
@-Random, 10 + random, 10 @@
If test "$ #"-eq 0
Then
Nohup $ ledir/mysqld -- basedir = $ MY_BASEDIR_VERSION -- datadir = $ DATADIR \
--- Skip-locking> $ err_log 2> & 1
+ -- Skip-locking-O max_connections = 1000 >>$ err_log 2> & 1
Else
Nohup $ ledir/mysqld -- basedir = $ MY_BASEDIR_VERSION -- datadir = $ DATADIR \
--- Skip-locking "$ @" >>$ err_log 2> & 1
+ -- Skip-locking "$ @"-O max_connections = 1000 >>$ err_log 2> & 1
Fi
If test! -F $ pid_file # This is removed if normal shutdown
Then
Disable mysql and restart it.
/Mysqladmin path/mysqladmin-uroot-p variables
Enter the password of the root database account.
| Max_connections | 1000 |
That is, the new change has taken effect.
Unlock the original MySQL code and go to the SQL directory to modify mysqld. cc. find the following line:

{"Max_connections", (long *) & max_connections, 1, 1 },

Change it:

{"Max_connections", (long *) & max_connections, 1, 1 },

Save the disk and exit./configure; make install to achieve the same effect.
MySql 3.XX increases the maximum number of connections:

Run c: \ mysql \ bin \ WinMySQLAdmin.exe
To the tab "Variables"
Find the max_connections variable and check its value.
Then, add the following parameters to the "my. ini Setup" tab:

[Mysqld]
Set-variable = max_connections = 1000

Click "Save Modification ",
Go to "control panel/administrative tools/services /"
Shut down and restart the mysql service.

Go to the WinMySQLAdmin.exe tab "Variables"
Click Refresh Variables"
Find the max_connections variable to check whether its value has changed.

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.