mysql导入数据相关的一些东西_MySQL
![WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB](/static/front/mobimages/moren/moren.png)
- WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
- 2016-06-01 14:05:471015browse
本机直接导入数据:
在DOS下打入命令:
D:\>mysql -p回车后输入密码就可以了
---------------------------------------
提供一个工具方便大家备份和导入数据,非常方便!
请在backup.php和restore.php文件里填写好你的sql连接数据,用户名和密码等
工具下载:fun.my.u517.com/backup.rar
------------------------------------------------------------------------------
导入服务器时出错的解决方法:
一个是MySQL version 4.1.8-standard-log
另一个MySQL version 4.0.23-standard 恢复数据总是出错,是不是这个原因?
那怎么解决,要到phpMyAdmin里一个一个导出来,然后导入新的空间? 出错提示:
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 )
恢复办法:
解决办法:修改你的备份文件
将其中的
ENGINE=MyISAM DEFAULT CHARSET=latin1
改成
TYPE=MyISAM
将其中的(如果有的话)
ENGINE=Heap DEFAULT CHARSET=latin1
改成
TYPE=Heap
---------------------------------------------------------------------
本机调试:
加大mysql的最大连接数
mysql的最大连接数默认是100, 这个数值对于并发连接很多的数据库应用是远远不够
的,可以把它适当调大,
whereis safe_mysqld
找到safe_mysqld的位置,然后编辑它,找到mysqld启动的那两行,在后面加上参数
-O max_connections=1000
例如
--- safe_mysqld.orig Mon Sep 25 09:34:01 2000
+++ safe_mysqld Sun Sep 24 16:56:46 2000
@@ -109,10 +109,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
然后关闭mysql重启它,用
/mysqladmin所在路径/mysqladmin -uroot -p variables
输入root数据库账号的密码后可看到
| max_connections | 1000 |
即新改动已经生效。
解开MySQL的原代码,进入里面的sql目录修改mysqld.cc找到下面一行:
{ "max_connections", (long*) &max_connections,1000,1,16384,0,1},
把它改为:
{ "max_connections", (long*) &max_connections,1000,1,16384,0,1},
存盘退出,然后./configure ;make;make install可以获得同样的效果
MySql 3.XX 版本加大最大连接数:
运行 c:\mysql\bin\WinMySQLAdmin.exe
到选项卡“Variables”
找到变量 max_connections 察看其值
然后,到选项卡“my.ini Setup”加入参数:
[mysqld]
set-variable = max_connections=1000
点击“Save Modification”,
进入“控制面版/管理工具/服务/”
关闭并重启 mysql 服务。
到 WinMySQLAdmin.exe 界面选项卡“Variables”
点击“Refresh Variables”
找到变量 max_connections 察看其值是否改变。
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn