时间:2021-07-01 10:21:17 帮助过:26人阅读
是应为在mysql5.6版本以后,就需要输入密码了,
设置新密码,123,下次再登录的时候就要输入密码123,
mysql> set password for root@localhost = password(‘123‘); Query OK, 0 rows affected, 1 warning (0.29 sec)
=====
查看数据库 ,可以看到已经创建的表
mysql> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | bookmanage1 | | bookmanage2 | | db1 | | db2 | | gu_orm | | myorm | | mysql | | performance_schema | | s5orm | | school | | sys | +--------------------+ 12 rows in set (0.06 sec)
选择自己要修改的编码的 数据库,然后可以看到表的表的信息,进行修改
mysql> use gu_orm; Database changed mysql> \s -------------- mysql Ver 14.14 Distrib 5.7.18, for Win64 (x86_64) Connection id: 70 Current database: gu_orm Current user: root@localhost SSL: Not in use Using delimiter: ; Server version: 5.7.18 MySQL Community Server (GPL) Protocol version: 10 Connection: localhost via TCP/IP Server characterset: latin1 Db characterset: latin1 Client characterset: gbk Conn. characterset: gbk TCP port: 3306 Uptime: 14 hours 39 min 56 sec Threads: 4 Questions: 860 Slow queries: 0 Opens: 365 Flush tables: 1 Open tables: 256 Queries per second avg: 0.016 -------------- mysql> set character_set_client=utf8;------修改编码 Query OK, 0 rows affected (0.05 sec)
修改数据库的字符集mysql>use mydb
mysql>alter database mydb character set utf8;
创建数据库指定数据库的字符集
mysql>create database mydb character set utf8;
关于mysql 密码,编码问题
标签:x86_64 server 打开 编码 tcp ptime connect denied mys