Centos6.5安装mysql不能启动,应该安装mysql-server,centosmysqlserver

centos中安装mysql很简单如下命令即可

yum install mysql 装好了,

运行mysql ERROR 2002 (HY000): Can’t connect to local MySQL server
through socket ‘/var/lib/mysql/mysql.sock’
(2)。有文章说是权限问题,后来把权限搞成777也不行。说是没启动MYSQL。那就启动吧

[r[email protected]
mysql]# service mysql start mysql: unrecognized service 不行

/etc/rc.d/init.d/mysqld start -bash: /etc/rc.d/init.d/mysqld: No such
file or directory 依然不行。

 有人是装的mysql-server. 删除用yum remove mysql 。

yum install mysql-server

装好了。启动

[[email protected]
mysql]# service mysql start mysql: unrecognized service

然后 /etc/rc.d/init.d/mysql 启动

/etc/init.d/mysqld start Initializing MySQL database: Installing MySQL system tables… 110112 15:24:06
[Warning] option ‘max_join_size’: unsigned value
18446744073709551615 adjusted to 4294967295 110112 15:24:06 [Warning]
option ‘max_join_size’: unsigned value 18446744073709551615 adjusted
to 4294967295 OK Filling help tables… www.111cn.net
110112 15:24:06 [Warning] option ‘max_join_size’: unsigned value
18446744073709551615 adjusted to 4294967295 110112 15:24:06 [Warning]
option ‘max_join_size’: unsigned value 18446744073709551615 adjusted
to 4294967295 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 localhost.localdomain 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: www.111cn.net cd /usr ;
/usr/bin/mysqld_safe &

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

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

The latest information about MySQL is available on the web at Support
MySQL by buying support/licenses at 
[ OK ] Starting MySQL: [ OK ]

 //博文来源 QQ463431476

加到自启动了吧。省的麻烦

chkconfig mysqld on

注意一下,这里是mysqld 不是mysql

运行一下mysql

[[email protected]
/]# mysql Welcome to the MySQL monitor. Commands end with ; or g. Your
MySQL connection id is 2 Server version: 5.0.77 Source distribution

Type ‘help;’ or ‘h’ for help. Type ‘c’ to clear the buffer.

再试试
[[email protected]
mysql]# service mysqld restart Stopping MySQL: [ OK ] Starting
MySQL: [ OK ]

都OK了!

centos中安装mysql很简单如下命令即可 yum install mysql 装好了, 运行mysql
ERROR 200…

源码安装nginx可能会困难重重啊,所以推荐个简单的yum安装方式
添加新源
[[email protected]
~]# wget
[[email protected]
~]# sh ./atomic
Atomic Archive installer, version 2.0.9

BY INSTALLING THIS SOFTWARE AND BY USING ANY AND ALL SOFTWARE
PROVIDED BY ATOMICORP LIMITED YOU ACKNOWLEDGE AND AGREE:

THIS SOFTWARE AND ALL SOFTWARE PROVIDED IN THIS REPOSITORY IS
PROVIDED BY ATOMICORP LIMITED AS IS, IS UNSUPPORTED AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ATOMICORP LIMITED, THE
COPYRIGHT OWNER OR ANY CONTRIBUTOR TO ANY AND ALL SOFTWARE PROVIDED
BY OR PUBLISHED IN THIS REPOSITORY BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
OF THE POSSIBILITY OF SUCH DAMAGE.

Do you agree to these terms? (yes/no) [Default: yes] yes
Configuring the [atomic] yum archive for this system

Installing the Atomic GPG key: OK
Downloading atomic-release-1.0-16.el6.art.noarch.rpm: OK

The Atomic Rocket Turtle archive has now been installed and configured
for your system
The following channels are available:
atomic – [ACTIVATED] – contains the stable tree of ART packages
atomic-testing – [DISABLED] – contains the testing tree of ART
packages
atomic-bleeding – [DISABLED] – contains the development tree of ART
packages

[[email protected]
~]# yum check-update
[[email protected]
~]# yum -y install nginx mysql-server php-fpm php-cli php-pdo
php-mysql php-mcrypt php-mbstring php-gd php-tidy php-xml php-xmlrpc
php-pear php-pecl-memcache php-eaccelerator

添加nginx 默认主页index.php
[[威尼斯人平台,email protected]
~]#vim /etc/nginx/conf.d/default.conf

location / {
root /usr/share/nginx/html;
index index.html index.htm index.php;
}

配置nginx支持php
[[email protected]
~]#vim /etc/nginx/conf.d/default.conf

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ .php$ {
root /usr/share/nginx/html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME
/$document_root$fastcgi_script_name;
include fastcgi_params;
}
配置php-fpm
[[email protected]
~]# vim /etc/php-fpm.d/www.conf

; Unix user/group of processes
; Note: The user is mandatory. If the group is not set, the default
user’s group
; will be used.
; RPM: apache Choosed to be able to access some dir as httpd
user = nginx
; RPM: Keep a group allowed to write in log dir.
group = nginx

启动mysql
[[email protected]
~]# service mysqld start
初始化 MySQL 数据库: Installing MySQL system tables…
130324 14:00:01 [Note] libgovernor.so not found
OK
Filling help tables…
130324 14:00:13 [Note] libgovernor.so not found
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 localhost.localdomain 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!

[确定]
正在启动 mysqld: [确定]
[[email protected]
~]# service nginx start
正在启动 nginx: [确定]
[[email protected]
~]# /etc/rc.d/init.d/php-fpm start
正在启动 php-fpm: [确定]

在浏览器中输入

添加新源
[[email protected]
~]# wget
[[email protected]

相关文章