Ubuntu下mysql-server的安装
2016-03-14 16:48
471 查看
(1)更新
(2)安装
(3)启动
(4)查看是否安装成功
(5)登录
(6)查看当前的数据库
+--------------------+
| Database |
+--------------------+
| information_schema |
| freeradius |
| mysql |
| performance_schema |
| radius |
+--------------------+
5 rows in set (0.02 sec)
mysql>
(7)选择performance_schema数据库就行下一步操作,使用use performance_schema命令,显示当前数据库的表单
#apt-get update
(2)安装
#apt-get install mysql-server 出现窗口设置"root"用户的密码为"456456"
(3)启动
#service mysql start 正常 出现mysql start/running, process 4429 已运行 出现start: Job is already running: mysql 停止 命令#service mysql stop 正常 出现mysql stop/waiting
(4)查看是否安装成功
#netstat -tap | grep mysql 正常 出现 //需要启动mysql tcp 0 0 localhost:mysql *:* LISTEN 4429/mysqld 如果看到有mysql 的socket处于 listen 状态则表示安装成功
(5)登录
#mysql -u root -p //以root身份登录 Enter password: 456456 //要求输入root账户的密码 正常 出现 Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 36 Server version: 5.5.46-0ubuntu0.12.04.2 (Ubuntu) Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql>
(6)查看当前的数据库
mysql> show databases; 获取信息如下:
+--------------------+
| Database |
+--------------------+
| information_schema |
| freeradius |
| mysql |
| performance_schema |
| radius |
+--------------------+
5 rows in set (0.02 sec)
mysql>
(7)选择performance_schema数据库就行下一步操作,使用use performance_schema命令,显示当前数据库的表单
mysql> use performance_schema Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed mysql> show tables; +----------------------------------------------+ | Tables_in_performance_schema | +----------------------------------------------+ | cond_instances | | events_waits_current | | events_waits_history | | events_waits_history_long | | events_waits_summary_by_instance | | events_waits_summary_by_thread_by_event_name | | events_waits_summary_global_by_event_name | | file_instances | | file_summary_by_event_name | | file_summary_by_instance | | mutex_instances | | performance_timers | | rwlock_instances | | setup_consumers | | setup_instruments | | setup_timers | | threads | +----------------------------------------------+ 17 rows in set (0.00 sec) mysql>
相关文章推荐
- MySql 主键
- MySQL查看SQL语句执行效率
- MySQL索引
- MySql连接——内连接、外连接(左连接、右连接、全连接)
- MySQL索引类型总结和使用技巧以及注意事项
- YUM 安装并配置MYSQL
- Mysql 主从热备份
- MySQL查询指定行的记录
- 黄聪:MySQL 按指定字段自定义列表排序
- Mysql timestamp 类型
- servlet&jsp 及MySQL 乱码解决方案
- mysql常用字符串操作函数大全,以及实例
- 如何在Windows系统中配置Mysql群集(Mysql Cluster)
- MySQL备份之增量备份方案
- mysql 查看表结构,字段的基本信息(简单明了)。
- mysql工具篇--Workbench的使用
- mySql 时间类型
- MySQL优化必须调整的10项配置
- MySQL数据库的优化
- navicat 1045 access denied for user