国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 數(shù)據(jù)庫 > MySQL > 正文

mysql登陸告錯mysql unknown variable basedir

2024-07-24 12:31:55
字體:
來源:轉載
供稿:網(wǎng)友
       使用mysql登陸數(shù)據(jù)庫報錯
       [root@localhost ~]# mysql -uroot -p
       mysql: unknown variable 'basedir=/usr'
 
       報錯原因:
       配置文件里面的格式有誤,[mysqld]寫成了[mysql]
       [root@localhost step]# cat /etc/my.cnf
       [mysql]
       basedir = /usr
      datadir = /var/lib/mysql
 
解決方法:
將[mysql]改為[mysqld]
[root@localhost step]# cat /etc/my.cnf
[mysqld]
basedir = /usr
datadir = /var/lib/mysql
log-error = /var/lib/mysql/localhost.localdomain.err
pid-file = /var/lib/mysql/localhost.localdomain.pid
log-bin=/var/lib/mysql/mysqld-bin
binlog_format=row
binlog-do-db=dmcdbTEST
 
之后重啟數(shù)據(jù)庫
[root@localhost mysql]# mysqladmin -uroot -p shutdown
[root@localhost mysql]# mysqld_safe --defaults-file=/etc/my.cnf &
 
數(shù)據(jù)庫可以正常連接
[root@localhost ~]# mysql -uroot -p
Warning: Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor.  Commands end with ; or /g.
Your MySQL connection id is 1
Server version: 5.6.21-70.1 Percona Server (GPL), Release 70.1, Revision 698
 
mysql> show global variables like '%double%';
+--------------------+-------+
| Variable_name      | Value |
+--------------------+-------+
| innodb_doublewrite | ON    |
+--------------------+-------+
1 row in set (0.00 sec)

(編輯:武林網(wǎng))

發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 锡林浩特市| 葵青区| 弥勒县| 开江县| 通化市| 赣州市| 驻马店市| 武川县| 西充县| 北川| 泰来县| 大同市| 慈利县| 益阳市| 包头市| 周口市| 额济纳旗| 枣庄市| 南通市| 万荣县| 龙里县| 抚州市| 得荣县| 密山市| 连云港市| 林芝县| 清涧县| 西城区| 安图县| 陕西省| 宜阳县| 兰考县| 雷州市| 桃园市| 大英县| 孙吴县| 黄石市| 南丰县| 南靖县| 永丰县| 太仓市|