Mysql登录
登录
MySQL的命令是
mysql,
mysql 的使用语法如下:
mysql [-u username] [-h host] [-p[password]] [dbname]
username 与 password 分别是 MySQL 的用户名与密码, mysql的初始管理帐号是root,没有密码,注意:这个root用户不是Linux的系统用户。 MySQL默认用户是root,由于初始没有密码,第一次进时只需键入 mysql即可。
[root@test1 local]# mysql
Welcome to the MySQL monitor. Commands end with ; or /g.
Your MySQL connection id is 1 to server version: 4.0.16-standard
Type 'help;' or '/h' for help. Type '/c' to clear the buffer.
mysql>
出现了“ mysql>”提示符,恭喜你,安装成功!
增加了密码后的登录格式如下:
mysql -u root -p
Enter password: (输入密码)
其中-u后跟的是用户名,-p要求输入密码,回车后在输入密码处输入密码。
mysql [-u username] [-h host] [-p[password]] [dbname]
username 与 password 分别是 MySQL 的用户名与密码, mysql的初始管理帐号是root,没有密码,注意:这个root用户不是Linux的系统用户。 MySQL默认用户是root,由于初始没有密码,第一次进时只需键入 mysql即可。
[root@test1 local]# mysql
Welcome to the MySQL monitor. Commands end with ; or /g.
Your MySQL connection id is 1 to server version: 4.0.16-standard
Type 'help;' or '/h' for help. Type '/c' to clear the buffer.
mysql>
出现了“ mysql>”提示符,恭喜你,安装成功!
增加了密码后的登录格式如下:
mysql -u root -p
Enter password: (输入密码)
其中-u后跟的是用户名,-p要求输入密码,回车后在输入密码处输入密码。
| Mysql重启的方法 | |
|
Linux 下:
推荐安全的重启方法 $mysql_dir/bin/mysqladmin -u root -p shutdown $mysql_dir/bin/safe_mysqld & mysqladmin和mysqld_safe位于Mysql安装目录的bin目录下,很容易找到的。 Win下: 开始->运行-> 停止:net stop mysql 启动:net start mysql 前提MYSQL已经安装为windows服务 | |
1348

被折叠的 条评论
为什么被折叠?



