Mysql应用linux下mysql数据库安装与配置步骤
《Mysql应用linux下mysql数据库安装与配置步骤》要点: MYSQL必读一,查看LINUX的版本 LSB Version: :core-3.1-amd64:core-3.1-ia32:core-3.1-noarch:graphics-3.1-amd64:graphics-3.1-ia32:graphics-3.1-noarch Distributor ID: RedHatEnterpriseServer Description: Red Hat Enterprise Linux Server release 5.2 (Tikanga) Release: 5.2 Codename: Tikanga ? MYSQL必读然后,去mysql官网http://dev.mysql.com/downloads/mysql/下载MySQL的相应版本的安装文件. MYSQL必读分别是server和client版本. RedHat Enterprise Linux 5 RPM (AMD64,Client programs) (4 Jul 2011,7.2M) RedHat Enterprise Linux 5 RPM (AMD64,Server) (4 Jul 2011,20.3M) ? MYSQL必读具体文件见二. MYSQL必读在mysql文件路径下,输入如下命令即可. MYSQL必读首先,安装服务器端 : MYSQL必读其次,安装客户端 : ? MYSQL必读例如: Preparing...??????????????? ########################################### [100%]? ?? 1:MySQL-server-community ########################################### [100%]? ? 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? 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.? ? Please report any problems with the /usr/bin/mysqlbug script!? ? Starting MySQL..[è·?¨]? Giving mysqld 2 seconds to start? [root@jbxue software]# rpm -ivh MySQL-client-community-5.1.58-1.rhel5.x86_64.rpm? Preparing...??????????????? ########################################### [100%]? ?? 1:MySQL-client-community ########################################### [100%]? [root@jbxue software]#? ? MYSQL必读三,安装完成后, ? //使用如下命令查看系统是否已经安装mysql [root@jbxue mysql]# rpm –qa | grep mysql ? MYSQL必读或键入命令: tcp 0 0 127.0.0.1:3306 127.0.0.1:33648 ESTABLISHED tcp 0 0 127.0.0.1:3306 127.0.0.1:33649 ESTABLISHED ? MYSQL必读出现以上内容. ? MYSQL必读即表示linux下mysql安装成功 MYSQL必读第二部发,对已安装完成的mysql,进行相应的配置 ? [ysong@IDC ~]$mysql -uroot -pysong Welcome to the MySQL monitor. Commands end with ; or g. Your MySQL connection id is 5159 Server version: 5.1.58-community MySQL Community Server (GPL) Copyright (c) 2000,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> ? MYSQL必读1、用命令启动mysql Starting MySQL.Manager of pid-file quit without updating file.[失败] ? MYSQL必读2、用命令停止mysql ? MYSQL必读1:创建用户: [root@jbxue ~]$ mysql -uysong -psong [root@jbxue ~]$ mysql -uroot -pysong grant all privileges on e6mall.* to ysong@'%' grant select,insert,alter,drop on e6mall.* to ysong@"%" identified by "song"; GRANT ALL PRIVILEGES ON e6mall.* TO ysong@"%" IDENTIFIED BY "song"; use mysql; select user,password from user; delete from user where user is NULL update user set password='ysong' where user is 'ysong'; MYSQL必读2:授权: update user set password=password('mysql') where user='root'; update user set password=password('ysong') where user='ysong'; flush privileges; ? MYSQL必读最后,创建数据库,导入数据库sql文件. create database e6mall; mysql -uroot -pysong e6mall < /opt/mysql/e6mall.sql; MYSQL必读至此,就完成了linux下mysql数据库的安装与配置,希望对大家有所赞助. 编程之家PHP培训学院每天发布《Mysql应用linux下mysql数据库安装与配置步骤》等实战技能,PHP、MYSQL、LINUX、APP、JS,CSS全面培养人才。 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |