Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install mysql service in fedora8 system

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article will explain in detail how to install mysql service in the fedora8 system, the content of the article is of high quality, so the editor will share it with you for reference. I hope you will have some understanding of the relevant knowledge after reading this article.

Installation process:

Su to root permissions.

# tar-zvxf mysql-5.0.45-linux-i686.tar.gz

# mv mysql-5.0.45/ / usr/local/mysql

# cd / usr/local/mysql

# groupadd mysql

# useradd-g mysql mysql

# chown-R mysql.

# chgrp-R mysql.

# scripts/mysql_install_db-user=mysql

# chown-R root.

# chown-R mysql data

# bin/mysqld_safe-- user=mysql &

According to the official documentation, this should start, but the error is as follows:

Nohup: ignoring input and redirecting stderr to stdout

Starting mysqld daemon with databases from / var/lib/mysql

STOPPING server from pid file / var/run/mysqld/mysqld.pid

071112 00:22:06 mysqld ended

View the log:

# less / var/log/mysqld.log

One of the paragraphs is as follows:

071112 0:22:06 [ERROR] / usr/local/mysql/bin/mysqld: Can't create/write to file'/ var/run/mysqld/mysqld.pid' (Errcode: 2)

071112 0:22:06 [ERROR] Can't start server: can't create PID file: No such file or directory

071112 00:22:06 mysqld ended

# cd / var/run/

# ls

Mysqld directory does not exist

# mkdir / var/run/mysqld

# cd / var/run/mysqld

Create a file mysqld.pid

# touch mysqld.pid

# cd..

# chown-R mysql mysqld.

# cd / usr/local/mysql/

# bin/mysqld_safe-- user=mysql &

Nohup: ignoring input and redirecting stderr to stdout

Starting mysqld daemon with databases from / var/lib/mysql

It can start normally.

# bin/mysqladmin-u root password root

Another mistake.

[root@localhost mysql] # bin/mysqladmin-u root password root

Bin/mysqladmin: connect to server at 'localhost' failed

Error: 'Can't connect to local MySQL server through socket' / tmp/mysql.sock' (2)'

Check that mysqld is running and that the socket:'/ tmp/mysql.sock' exists!

[root@localhost mysql] # bin/mysql-u root-p

Enter password:

ERROR 2002 (HY000): Can't connect to local MySQL server through socket'/ tmp/mysql.sock' (2)

Analysis: yes / tmp/mysql.sock does not exist

# cd / var/lib/mysql/

Ibdata1 ib_logfile0 ib_logfile1 mysql/ mysql.sock test/

Because the default mysql.sock of mysql is in / var/lib/mysql/mysql.sock

Create a symbolic connection:

# ln-s / var/lib/mysql/mysql.sock / tmp/mysql.sock

# bin/mysql-u root

Welcome to the MySQL monitor. Commands end with; or\ g.

Your MySQL connection id is 1

Server version: 5.0.45 MySQL Community Server (GPL)

Type 'help;' or'\ h' for help. Type'\ c'to clear the buffer.

Mysql >

Modify root password

# cd / usr/local/mysql/

# bin/mysqladmin-u root-p password yourpassword

On how to install mysql services in the fedora8 system to share here, I hope that the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report