云乐国鑫

随笔分类 -  mysql

MySQL学习使用心得。
摘要:查询数据库中所有表名select table_name from information_schema.tables where table_schema='csdb' and table_type='base table';查询指定数据库中指定表的所有字段名select column_name from information_schema.columns where table_schema=... 阅读全文
posted @ 2018-01-08 11:13 国鑫 阅读(3199) 评论(0) 推荐(0)
摘要:create database ${db_name} default charset utf8 COLLATE utf8_general_ci;grant all on ${db_name}.* to '${user_name}'@'localhost' IDENTIFIED BY '${password}';flush privileges; 阅读全文
posted @ 2018-01-08 11:10 国鑫 阅读(217) 评论(0) 推荐(0)
摘要:MySQL默认只允许用户本地登录,需要远程连接可进行如下操作:允许root用户在任何地方进行远程登录,并具有所有库任何操作权限:使用root用户登录mysql:mysql -u root -p"youpassword" 授权:mysql>GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123456' WITH GRANT OPTIO... 阅读全文
posted @ 2018-01-08 11:03 国鑫 阅读(9170) 评论(0) 推荐(0)
摘要:1.下载mysql的repo源$ wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm2.安装mysql-community-release-el7-5.noarch.rpm包$ sudo rpm -ivh mysql-community-release-el7-5.noarch.rpm安装这个包后,会获得两个mys... 阅读全文
posted @ 2018-01-08 10:52 国鑫 阅读(250) 评论(0) 推荐(0)

版权所有@snzigod