【MySQL】常见错误与经常使用命令的集锦
【背景介绍】
如今开发使用的是MySQL数据库。如今来看,发现自己在MySQL中的经历越来越多。前两天,自己电脑的MySQL数据库出问题了,折腾了我好几个小时~~
- (1) windows mysql提示:1045 access denied for user'root'@'localhost' using password yes
# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html
# *** DO NOT EDIT THIS FILE. It's a template which will be copied to the
# *** default location during install, and will be replaced if you
# *** upgrade to a newer version of MySQL. [mysqld] # Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M # Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin # These are commonly set, remove the # and set as required.
basedir = E:\MySQL\mysql-5.6.24-winx64
datadir = E:\MySQL\mysql-5.6.24-winx64\data
# port = 8099
# server_id = sa # Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 128M
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
skip-grant-tables
default-character-set=utf8
- (2) ERROR 1364(HY000):Field 'ssl_cipher' doesn't have a default value
- (3) 启动MySQL服务,出现错误1067:
- (4) 2003-Can't connect to MySQL server on 'localhost'(10061)
- (5) Host "localhost" is not allowed to connect to mysql server
- (6) Access denied for user 'root'@'localhost' (using password:YES)
[databasename];
user,host,password from user;
user set host = '%' where user='root';
ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123456' WITH GRANT OPTION;
PRIVILEGES;(不论什么主机都能够连接到mysqlserver)
- (7) 中文乱码问题
第一版思修考试的时候。时间紧张,没有全然解决问题,部分能够导入中文,部分又导入的是乱码。
在接下来的这一版开发中,最终找到了问题的根源。
当你的MySQL返回的字符串的编码格式(字符集)与你的客户工具程序(mysql,
php, query browser, ...)当前使用的字符集不同一时候,就会造成乱码。
乱码后须要检查的信息:
big5 | Big5 Traditional Chinesegb2312 | GB2312 Simplified Chinesegbk | GBK Simplified Chineseutf8 | UTF-8 Unicode
- 服务启动与停止
- 登录mysql
- 显示数据库列表
- 选择数据库和显示数据表
- 建库、删库
- 备份
- 还原
3.学习是一个漫长的、不断补充、不断积累的过程。实际上,解决中文乱码的问题是后来补充的。由于一直都在使用mysql,一直处在不断学习地过程中,后面的学习或者偶尔的遇见,才使得自己把之前的问题攻克了,所以,学习前后是一个互为补充的阶段。
【MySQL】常见错误与经常使用命令的集锦的更多相关文章
- MySQL常见错误类型
MySQL常见错误类型:1005:创建表失败1006:创建数据库失败1007:数据库已存在,创建数据库失败1008:数据库不存在,删除数据库失败1009:不能删除数据库文件导致删除数据库失败1010: ...
- MySQL常见错误及其解决办法
1.连接类 (1).问题:MySQL server has gone away 解决办法:出现该报错常见的原因是服务器超时了并且关闭了连接.缺省地,如果没有事情发生,服务器在 8个小时后关闭连接.如 ...
- MySql: 常见错误
1. No query specified 出现此错误是sql不合法原因:比如: mysql> select * from t\G;*************************** 1. ...
- mysql常见错误及解决方案
mysql error 2005 - Unknown MySQL server host 'localhost'(0) 此错误一般为地址信息错误,注意是否有空格. 在连接本地数据库时,最好使用127. ...
- MYSQL常见错误及其解决方式
欢迎和大家交流技术相关问题: 邮箱: jiangxinnju@163.com 博客园地址: http://www.cnblogs.com/jiangxinnju GitHub地址: https://g ...
- nodejs操作mysql常见错误
1.Cannot enqueue Handshake after already enqueuing a Hand shake.这个错误提示意思是某个数据库连接已经执行了,不能进行多次连接了.遇到此类 ...
- 安装mysql常见错误解决方法
Mysql ERROR 1698 (28000) 解决 解决mysqld_safe Directory '/var/run/mysqld' for UNIX socket file don't exi ...
- MySQL常见错误
1. TokuFT file system space is really low and access is restricted 解决方法:修改tokudb_fs_reserve_percent参 ...
- Django连接mysql常见错误
1045, "Access denied for user 'root'@'localhost' (using password: YES)" 数据库的密码或用户名不对,查看set ...
随机推荐
- Chrome发布73 beta版:增强Linux用户体验
Google开发者周五推动Chrome 73进入他们的测试频道,因为他们准备在3月12日左右推出这款网页浏览器更新,以便稳定推出.除非另有说明,否则下面描述的更改适用于Android,Chrome O ...
- css与jquery、图标字体
*)还能这样选择 header #search input[type="text"] *)按钮常用颜色:#008cBA(字母大小写没有区别) *)清除浮动后,text-align没 ...
- ArcGIS api for javascript——鼠标悬停时显示信息窗口
描述 本例展示当用户在要素上悬停鼠标时如何显示InfoWindow.本例中,要素是查询USA州图层的QueryTask的查询结果.工作流程如下: 1.用户单击一个要素 2.要素是“加亮的”图形. 3. ...
- Firefox中使用pac
https://campus.barracuda.com/product/websecurityservice/article/WSS/ConfigProxyWithPACFile/ https:// ...
- python 二分法O(logn)
def bin_search(data_set, val): low = high = len(data_set) - while low <= high: mid = (low + high) ...
- Weka中数据挖掘与机器学习系列之Weka Package Manager安装所需WEKA的附加算法包出错问题解决方案总结(八)
不多说,直接上干货! Weka中数据挖掘与机器学习系列之Weka系统安装(四) Weka中数据挖掘与机器学习系列之Weka3.7和3.9不同版本共存(七) 情况1 对于在Weka里,通过Weka P ...
- P3507 [POI2010]GRA-The Minima Game
题目描述 Alice and Bob learned the minima game, which they like very much, recently. The rules of the ga ...
- springmvc使用jQuery.datatable时遇到的错误
springmvc使用jQuery.datatable时遇到的错误 1正确时返回 josn结果: {,,,,,,,,,,,,,,,,"} 页面显示处理中(processing),列表空白,其 ...
- 学习思考:思考>努力
学.习.思.考 学习.思考,这2个词,4个字,其实代表了4个不同的动作:学.习.思.考. 学,就是从外部(他人)获得. 习,就是练习,行动. 思,就是从内部(自己)获得. 考,就是考量,检测. 因此, ...
- Cisco交换机IOS配置介绍
一.模式• 用户模式(>):• 特权模式(#):• 全局配置模式(config#):• 接口配置模式(config-if#):• 线路模式(#config-line): 二.基本IOS命令结构• ...