随笔分类 - 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=...
阅读全文
摘要: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;
阅读全文
摘要:MySQL默认只允许用户本地登录,需要远程连接可进行如下操作:允许root用户在任何地方进行远程登录,并具有所有库任何操作权限:使用root用户登录mysql:mysql -u root -p"youpassword" 授权:mysql>GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123456' WITH GRANT OPTIO...
阅读全文
摘要: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...
阅读全文

浙公网安备 33010602011771号