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

Installation process of mysql5 on suse linux 10

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

Share

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

This article mainly introduces "the installation process of mysql5 on suse linux 10". In the daily operation, I believe that many people have doubts about the installation process of mysql5 on suse linux 10. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts about "the installation process of mysql5 on suse linux 10". Next, please follow the editor to study!

This article mainly introduces the installation and simple configuration of mysql (64-bit) on SUSE Linux 10. All operations have been verified in the test environment, only this record.

I. install the software

# groupadd mysql

# useradd-g mysql mysql

# passwd mysql

Decompression and installation

# tar zxvf mysql-5.1.30.tar

#. / configure-prefix=/usr/local/mysql/-with-charset=gbk-with-extra-charsets=all

# make & & make install

Configure parameters

# / home/mysql-5.1.30/support-files # cp my-medium.cnf / etc/my.cnf

# vi / etc/my.cnf

# skip-federated

Thread_concurrency = 2 / / the number of concurrent threads is preferably twice the number of cpu

Datadir = / usr/local/mysql/data / / the location where the directory data directory is added

Save exit

Initialize the database

/ usr/local/mysql/bin #

. / mysql_install_db-- user=mysql-- basedir=/usr/local/mysql-- datadir=/usr/local/mysql/data

Second, configure the database

1. Modify database security

# chown-R mysql.root / usr/local/mysql

# chmod-R 755 / usr/local/mysql

# bin/mysqld_safe-user=mysql &

# bin/mysqladmin-u root password admin@275

# bin/mysql-u root-p

Enter the password to log in

Mysql > show databases

Mysql > use mysql

Mysql > show tables

Mysql > create table A1 (id int (3) auto_increment not null primary key, xm char (8), xb char (2), csny date)

Example:

Add a user's user_1 password to 123, so that he can log in on any host and have the authority to query, insert, modify and delete all databases. First use the root user to connect to MySQL, and then type the following command:

Mysql > grant select,insert,update,delete on *. * to user_1@ "%" Identified by "123"

Add a user user_2 password to 123, so that this user can only log in on localhost, and can query, insert, modify and delete the database aaa (localhost refers to the local host, that is, the host where the MySQL database is located), so that even if the user knows the user_2 password, he can not directly access the database from the Internet, he can only operate the aaa library through the MYSQL host.

Mysql > grant select,insert,update,delete on aaa.* to user_2@localhost identified by "123"

If the new user cannot log in to MySQL, use the following command when logging in:

Mysql-u user_1-p-h 192.168.113.50 (- h followed by the ip address of the host to be logged in)

Copy the database startup script to the installation directory

/ home/mysql-5.1.30/support-files # cp mysql.server / usr/local/mysql/bin

# chmod 755 / usr/local/mysql/bin/mysql.server

Vi / etc/profile

MYSQL_HOME=/usr/local/mysql

PATH=$PATH:$MYSQL_HOME/bin

Export MYSQL_HOME PATH # Note here export must be lowercase

Source / etc/profile

And then under any directory

# mysql.server start

2. Register for automatic service

/ usr/local/mysql/bin # cp mysql.server / etc/init.d/mysqld

/ usr/local/mysql/bin # chkconfig-- add mysqld

Mysqld 0:off 1:off 2:on 3:on 4:on 5:on 6:off

Server1:/usr/local/mysql/bin # chkconfig mysqld on

# netstat-antp | grep: 3306

So far, the installation is complete.

You can log in to mysql using mysql-u root-p anywhere.

At this point, the study on "the installation process of mysql5 on suse linux 10" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

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