MySQL
dijk
这个作者很懒,什么都没留下…
展开
-
MySQL: 普通用户查看存储过程权限问题
MySQL: 普通用户查看存储过程权限问题SHOW GRANTS FOR cpcampus;#关键GRANT SELECT ON `mysql`.`proc` TO 'cpcampus'@'%';SHOW GRANTS FOR cpcampus;原创 2018-11-11 18:35:43 · 2110 阅读 · 0 评论 -
Problem: MySQL: -bash: mysql: command not found
ProblemProblem: MySQL: -bash: mysql: command not foundOn CentOS, MySQL works fine, but can not use “mysql” command in terminal, and says “-bash: mysql: command not found”.Solution# cd /usr/local/...原创 2018-11-15 22:54:51 · 179 阅读 · 0 评论 -
MySQL: 查看root用户的权限
MySQL: 查看root用户的权限mysql> show grants for root;+-------------------------------------------+| Grants for root@% |+-------------------------------------------+| GRANT ALL...原创 2018-12-15 22:40:44 · 5697 阅读 · 0 评论 -
MySQL: 四舍五入
MySQL四舍五入ROUND 函数原创 2019-02-03 10:58:56 · 433 阅读 · 1 评论 -
MyBatis: Skill: 获取数据库自增id
MyBatis 获取数据库自增idWay 1insert标签中加上useGeneratedKeys=“true” keyProperty=“id”会将id组装到返回对象中而不是作为返回值<insert id="insertSelective" parameterType="com.lcworld.jiunixing.model.User" useGeneratedKeys="tr...原创 2019-02-18 12:56:25 · 316 阅读 · 0 评论 -
MySQL: Problem: [Err] 1153 - Got a packet bigger than 'max_allowed_packet' bytes [Err] /*
ProblemMySQL: [Err] 1153 - Got a packet bigger than ‘max_allowed_packet’ bytes [Err] /*Solutionmysql> show VARIABLES like '%max_allowed_packet%';+--------------------------+------------+| Va...原创 2019-02-19 08:42:02 · 942 阅读 · 0 评论 -
MySQL: Problem: 远程连接2003-can't connect to MYSQL server on ''(10060)
ProblemMySQL: 远程连接2003-can’t connect to MYSQL server on ‘’(10060)Solution1. 远程服务器上没有打开3306端口 #/sbin/iptables -I INPUT -p tcp --dport 3306 -j ACCEPT #/etc/rc.d/init.d/iptables save # service ipt...原创 2019-02-19 12:46:30 · 596 阅读 · 0 评论 -
MySQL: Skill: Add all privileges for user abc on database basic_data
MySQL: Add all privileges for user abc on database basic_dataSHOW GRANTS FOR abc;//resultsGRANT USAGE ON *.* TO 'abc'@'%' IDENTIFIED BY PASSWORD '*38E573FEE0457F38F79B14E4E5381EAA895B5FC1'GRANT SE...原创 2019-02-19 14:29:04 · 235 阅读 · 0 评论 -
MySQL: Skill: 查看root的权限
MySQL: 查看root的权限mysql> show grants for root;+-------------------------------------------+| Grants for root@% |+-------------------------------------------+| GRANT ALL P...原创 2019-02-19 14:33:19 · 458 阅读 · 0 评论 -
MySQL: 数据库拒绝访问[远程连接]
MySQL: 数据库拒绝访问[远程连接]登录MySQL$ /usr/local/mysql/bin/mysql -u root -pmysql> user mysql;mysql> select host from user;mysql> update user set host ='%' where user ='root';mysql> exit;重...原创 2018-11-11 18:31:46 · 994 阅读 · 0 评论 -
MySQL: 设置表名不区分大小写
MySQL: 设置表名不区分大小写vi修改/etc/my.cnf# vi /etc/my.cnf 在[mysqld]段后附加一句:lower_case_table_names=1如:[mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock lower_case_table_names=1重启MySQL...原创 2018-11-11 18:16:01 · 194 阅读 · 0 评论 -
MySQL: Fundamental control commands
Start MySQL in Ubuntumysql -u root -pEnter password:(Enter your password here!)Commandsmysql> show databases;Database:bookshop, mysql, test...mysql> use bookshop;Database changedmysql> show tables原创 2015-05-31 11:26:47 · 582 阅读 · 0 评论 -
MySQL: Change root password
mysql> use mysql;mysql> UPDATE user SET Password=PASSWORD('Your new password!') where USER=’root’; mysql> FLUSH PRIVILEGES; mysql> quit原创 2015-05-31 11:28:26 · 550 阅读 · 0 评论 -
MySQL: ERROR 1045 (28000) when GRANT
Description# mysql -uroot -p123456mysql> GRANT ALL PRIVILEGES ON *.* TO 'xyzuser'@'localhost' IDENTIFIED BY 'xyzuser' WITH GRANT OPTION;ERROR 1045 (28000): Access denied for user 'root'@'localhost'原创 2015-05-26 07:37:06 · 567 阅读 · 0 评论 -
MySQL: Change root password in Mac
Step 1.$ sudo /usr/local/mysql/bin/mysqld_safe –user=root & //start MySQL(Also, can start MySQL in System Preferences)Step 2.$ sudo /usr/local/mysql/bin/mysqladmin -uroot password yourpassword //set原创 2016-01-17 20:07:56 · 696 阅读 · 0 评论 -
Command: mysql5.7 start and stop in win10
mysql5.7 start and stop in win10C:\WINDOWS\system32>net start mysql57MySQL57 服务正在启动 .MySQL57 服务已经启动成功。C:\WINDOWS\system32>net stop mysql57MySQL57 服务正在停止.MySQL57 服务已成功停止。...原创 2018-10-27 14:39:00 · 174 阅读 · 0 评论 -
MySQL: CentOS6.8: ERROR 1044 (42000)
MySQL: ERROR 1044 (42000)现象mysql> use mysql;ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'mysql'如果使用“mysql -uroot -p”登陆会报错,即使密码正确也不能登录,而且发现,直接用“mysql -uroot”不输入密码也可以登...原创 2018-11-11 17:58:41 · 337 阅读 · 0 评论 -
MySQL: 忘记root密码: skip-grant-tables
MySQL 忘记root密码修改MySQL的登录设置# vi /etc/my.cnf 在[mysqld]段后附加一句:skip-grant-tables如:[mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock skip-grant-tables 重启MySQL登录并修改MySQL的root密码# ...原创 2018-11-11 18:07:17 · 227 阅读 · 0 评论 -
MySQL: Skill: Excel数据导入到MySQL表中
MySQL: Excel数据导入到MySQL表中使用Navicat for MySQL 或者 Navicat premium 121. 目标表2. 源数据3. 点击数据库Tables4. 选择数据源格式为Excel5. 选择Excel数据源所在Sheet6. 输入Excel中数据源字段名所在行数和需导入数据起始行数注意: Excel中字段名 应与 MySQL表中字段名 ...原创 2019-02-20 09:16:56 · 320 阅读 · 0 评论