.\mysql\user is marked as crashed 解决办法
I found a solution to anyone else who may be having this problem.
First start mysql using skip grant tables
root@ns1 [/var/lib/mysql/mysql]# service mysql start --skip-grant-tables
Starting MySQL [ OK ]
now with mysql started, you can repair the mysql/user table
root@ns1 [/var/lib/mysql/mysql]# mysqlcheck -r mysql user
mysql.user
warning : Number of rows changed from 1558 to 1556
status : OK
now that its repaired, restart mysql
root@ns1 [/var/lib/mysql/mysql]# service mysql stop
Shutting down MySQLs [ OK ]
root@ns1 [/var/lib/mysql/mysql]# service mysql start
Starting MySQL [ OK ]
can someone confirm that this solution is ok?
参考网站地址:http://www.webhostingtalk.com/showthread.php?t=580813
相关文档:
1 安装MySQL5
用下列命令安装MySQL:
yum install mysql mysql-server
然后我们为MySQL创建系统启动链接(这样的话,MySQL就会随着系统启动而启动),并启动MySQL服务器:
chkconfig –levels 235 mysqld on
/etc/init.d/mysqld start
运行
mysqladmin -u root password yourrootsqlpassword
来为root用户设置 ......
http://blog.c1gstudio.com/archives/602
nagios_plugin安装时正确关联mysql后会在libexec下产生check_mysql文件
/usr/local/nagios/libexec/check_mysql -h
check_mysql v2034 (nagios-plugins 1.4.13)
Copyright (c) 1999-2007 Nagios Plugin Development Team
< ......
手动建表:
CREATE TABLE `excel` (
`id` int(11) DEFAULT NULL,
`name` varchar(50) DEFAULT NULL,
`passwd` varchar(50) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=gb2312; 注意是gb2312
然后在连接数据库时加上:
useUnicode=true&characterEncoding=gb2312.
就ok啦! ......
1、mysql数据库有两种驱动:
MySQL Connector/J Driver、MMMysql driver。
2、导入导出数据库命令:(bin目录下)
导出:mysqldump -u root -p bokele >c:/mysql.sql --default-character-set=gbk
导入:C:\mysql\bin\> mysql -u root -p
说明:C:\mysql\bin\表示进入mysql程序 ......
启动:net start mySql;
进入:mysql -u root -p/mysql -h localhost -u root -p databaseName;
列出数据库:show databases;
选择数据库:use databaseName;
列出表格:show tables;
显示表格列的属性:show columns from tableName;
建立数据库:source fileNa ......