文档章节

Install MySQL for Database Server

ruyees
 ruyees
发布于 2014/10/05 11:48
字数 428
阅读 3
收藏 0

[root@www ~]# yum -y install mysql-server
[root@www ~]# /etc/rc.d/init.d/mysqld start 
Initializing MySQL database:  Installing MySQL system tables...
OK
Filling help tables...
OK

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:

/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h www.server.world password 'new-password'

Alternatively you can run:
/usr/bin/mysql_secure_installation

which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.

See the manual for more instructions.

You can start the MySQL daemon with:
cd /usr ; /usr/bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl
cd /usr/mysql-test ; perl mysql-test-run.pl

Please report any problems with the /usr/bin/mysqlbug script!

Starting mysqld:     [  OK  ]

[root@www ~]# chkconfig mysqld on 
[root@www ~]# mysql -u root # connect to MySQL
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.1.52 Source distribution

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

# show user info
mysql> select user,host,password from mysql.user; 

# set root password
mysql> set password for root@localhost=password('password'); 
Query OK, 0 rows affected (0.00 sec)
# set root password
mysql> set password for root@'127.0.0.1'=password('password'); 
Query OK, 0 rows affected (0.00 sec)
# set root password
mysql> set password for root@'www.server.world'=password('password'); 
Query OK, 0 rows affected (0.00 sec)
# delete anonymous user
mysql> delete from mysql.user where user=''; 
Query OK, 2 rows affected (0.00 sec)
mysql> select user,host,password from mysql.user;

mysql> exit # quit
Bye
[root@www ~]# mysql -u root -p # connect with root
Enter password:# MySQL root password
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.1.52 Source distribution

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> exit
Bye
 

本文转载自:http://zuoqiang.iteye.com/blog/1155033

共有 人打赏支持
ruyees
粉丝 3
博文 71
码字总数 0
作品 0
深圳
产品经理
私信 提问
reviewboard 安装

安装 Rewiew Board太复杂,依赖很多,嫌麻烦有个一键安装:https://bitnami.com/stack/reviewboard。下面是手动安装过程 极有可能还要装 安装 配置 问题...

langtu329
2016/09/19
85
0
Uninstall all those broken versions of MySQL and re-install it with Brew on Mac Mavericks

To remove an instance of MySQL from your macOS or OSX installation you need to delete a number of files via the command line, but first ensure that you have database dumps of yo......

丢失的羊羔
2016/12/02
10
0
zabbix3.0之server端部署详解

yum 配置 下载yum配置 rpm -ivh http://mirrors.aliyun.com/zabbix/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm 安装依赖包 [root@localhost conf]# yum install zabbix-......

凛冬一壶酒
06/26
0
0
Ubuntu 14.04 配置 Nginx, MySQL and PHP 环境

版权声明:本文为博主原创文章,未经博主允许不得转载。 目录(?)[+] 原文地址:http://www.cyberciti.biz/faq/install-lemp-linux-nginx-mysql-and-php-stack-on-ubuntu-linux-14-04-lts/ Ng...

刀剑如梦
2016/02/29
106
0
install Drupal 7.0 on FreeBSD 8

Our Prerequisites: FreeBSD 8.2 , MySQL 5.x, PHP 5.x, Apache 2.x Show stopper.. I got this notice: Database type * I have mysql server 5.5.11 installed and Drupal 7 install does ......

芒果龙
2011/10/20
0
0

没有更多内容

加载失败,请刷新页面

加载更多

Mariadb二进制包安装,Apache安装

安装mariadb 下载二进制包并解压 [root@test-a src]# wget https://downloads.mariadb.com/MariaDB/mariadb-10.2.6/bintar-linux-glibc_214-x86_64/mariadb-10.2.6-linux-glibc_214-x86_64.t......

野雪球
今天
3
0
ConcurrentHashMap 高并发性的实现机制

ConcurrentHashMap 的结构分析 为了更好的理解 ConcurrentHashMap 高并发的具体实现,让我们先探索它的结构模型。 ConcurrentHashMap 类中包含两个静态内部类 HashEntry 和 Segment。HashEnt...

TonyStarkSir
今天
3
0
大数据教程(7.4)HDFS的java客户端API(流处理方式)

博主上一篇博客分享了namenode和datanode的工作原理,本章节将继前面的HDFS的java客户端简单API后深度讲述HDFS流处理API。 场景:博主前面的文章介绍过HDFS上存的大文件会成不同的块存储在不...

em_aaron
昨天
4
0
聊聊storm的window trigger

序 本文主要研究一下storm的window trigger WindowTridentProcessor.prepare storm-core-1.2.2-sources.jar!/org/apache/storm/trident/windowing/WindowTridentProcessor.java public v......

go4it
昨天
7
0
CentOS 生产环境配置

初始配置 对于一般配置来说,不需要安装 epel-release 仓库,本文主要在于希望跟随 RHEL 的配置流程,紧跟红帽公司对于服务器的配置说明。 # yum update 安装 centos-release-scl # yum ins...

clin003
昨天
11
0

没有更多内容

加载失败,请刷新页面

加载更多

返回顶部
顶部