fedora 14 mysql安装+mysql GUI安装

原创文章,转载请注明: 转载自勤奋的小青蛙
本文链接地址: fedora 14 mysql安装+mysql GUI安装

今晚趁闲功夫,把我的fedora14的mysql安装下,顺便是把Linux里面的mysql的GUI操作软件也使用下,之前没接触过,不过感觉对我来说都不难。好吧,开始吧,我的运行的命令我会以红色标记给显示出来,保证每一步的执行都能够看得清楚,也方便我以后自己查阅。

[ypf@local ~]$ su - root

#切换到root身份

Password:

[root@local ~]# man yum

[root@local ~]# yum -y install mysql#两次TAB键,查看yum源上有什么关于mysql的

mysql-bench.i686 mysql-mmm-monitor.noarch

mysql-connector-c++-devel.i686 mysql-mmm.noarch

mysql-connector-c++.i686 mysql-mmm-tools.noarch

mysql-connector-java.i686 mysql-proxy-devel.i686

mysql-connector-odbc.i686 mysql-proxy.i686

mysql-connector-python3.noarch MySQL-python.i686

mysql-connector-python.noarch mysqlreport.noarch

mysql-devel.i686 mysql-server.i686

mysql++-devel.i686 mysql-test.i686

mysql-embedded-devel.i686 mysqltuner.noarch

mysql-embedded.i686 mysqludf_xql.i686

mysql.i686 mysql-utilities.noarch

mysql++.i686 mysql-workbench.i686

mysql++-manuals.i686 MySQL-zrm.noarch

mysql-mmm-agent.noarch

[root@local ~]# yum -y install mysql-server.i686    #安装mysqlserver

Loaded plugins: fastestmirror, langpacks, presto, refresh-packagekit

Adding en_US to language list

Loading mirror speeds from cached hostfile

updates/metalink | 8.1 kB 00:00

* fedora: mirrors.163.com

* rpmfusion-free: mirrors.163.com

* rpmfusion-free-updates: mirrors.163.com

* rpmfusion-nonfree: mirrors.163.com

* rpmfusion-nonfree-updates: mirrors.163.com

* updates: mirror.lupaworld.com

fedora-chromium-stable | 3.0 kB 00:00

rpmfusion-free-updates | 3.3 kB 00:00

rpmfusion-nonfree-updates | 3.3 kB 00:00

Setting up Install Process

Resolving Dependencies

--> Running transaction check

---> Package mysql-server.i686 0:5.1.58-1.fc14 set to be installed

--> Processing Dependency: mysql(x86-32) = 5.1.58-1.fc14 for package: mysql-server-5.1.58-1.fc14.i686

--> Processing Dependency: perl(DBI) for package: mysql-server-5.1.58-1.fc14.i686

--> Processing Dependency: perl-DBD-MySQL for package: mysql-server-5.1.58-1.fc14.i686

--> Processing Dependency: perl-DBI for package: mysql-server-5.1.58-1.fc14.i686

--> Running transaction check

---> Package mysql.i686 0:5.1.58-1.fc14 set to be installed

---> Package perl-DBD-MySQL.i686 0:4.017-1.fc14 set to be installed

---> Package perl-DBI.i686 0:1.613-1.fc14 set to be installed

--> Finished Dependency Resolution

 

Dependencies Resolved

 

================================================================================

Package Arch Version Repository Size

================================================================================

Installing:

mysql-server i686 5.1.58-1.fc14 updates 8.3 M

Installing for dependencies:

mysql i686 5.1.58-1.fc14 updates 894 k

perl-DBD-MySQL i686 4.017-1.fc14 fedora 137 k

perl-DBI i686 1.613-1.fc14 fedora 775 k

 

Transaction Summary

================================================================================

Install 4 Package(s)

 

Total download size: 10 M

Installed size: 28 M

Downloading Packages:

Setting up and reading Presto delta metadata

Processing delta metadata

Package(s) data still to download: 10 M

(1/4): mysql-5.1.58-1.fc14.i686.rpm | 894 kB 00:03

(2/4): mysql-server-5.1.58-1.fc14.i686.rpm | 8.3 MB 00:50

(3/4): perl-DBD-MySQL-4.017-1.fc14.i686.rpm | 137 kB 00:00

(4/4): perl-DBI-1.613-1.fc14.i686.rpm | 775 kB 00:03

--------------------------------------------------------------------------------------------------------------------------------------

Total 175 kB/s | 10 MB 00:58

Running rpm_check_debug

Running Transaction Test

Transaction Test Succeeded

Running Transaction

Installing : perl-DBI-1.613-1.fc14.i686 1/4

Installing : mysql-5.1.58-1.fc14.i686 2/4

Installing : perl-DBD-MySQL-4.017-1.fc14.i686 3/4

Installing : mysql-server-5.1.58-1.fc14.i686 4/4

 

Installed:

mysql-server.i686 0:5.1.58-1.fc14

 

Dependency Installed:

mysql.i686 0:5.1.58-1.fc14 perl-DBD-MySQL.i686 0:4.017-1.fc14 perl-DBI.i686 0:1.613-1.fc14

 

Complete!

[root@local ~]# yum install mysql-workbench.i686 #安装mysql的GUI图像化软件

Loaded plugins: fastestmirror, langpacks, presto, refresh-packagekit

Adding en_US to language list

Loading mirror speeds from cached hostfile

* fedora: mirrors.163.com

* rpmfusion-free: mirrors.163.com

* rpmfusion-free-updates: mirrors.163.com

* rpmfusion-nonfree: mirrors.163.com

* rpmfusion-nonfree-updates: mirrors.163.com

* updates: mirror.lupaworld.com

Setting up Install Process

Resolving Dependencies

--> Running transaction check

---> Package mysql-workbench.i686 0:5.2.34-1.fc14 set to be installed

--> Processing Dependency: libzip.so.1 for package: mysql-workbench-5.2.34-1.fc14.i686

--> Processing Dependency: pexpect for package: mysql-workbench-5.2.34-1.fc14.i686

--> Processing Dependency: libtinyxml.so.0 for package: mysql-workbench-5.2.34-1.fc14.i686

--> Processing Dependency: python-sqlite2 for package: mysql-workbench-5.2.34-1.fc14.i686

--> Processing Dependency: libctemplate.so.0 for package: mysql-workbench-5.2.34-1.fc14.i686

--> Processing Dependency: mysql-utilities for package: mysql-workbench-5.2.34-1.fc14.i686

--> Running transaction check

---> Package ctemplate.i686 0:0.97-1.fc14 set to be installed

---> Package libzip.i686 0:0.9.3-2.fc13 set to be installed

---> Package mysql-utilities.noarch 0:1.0.1-0.5.2.34.fc14 set to be installed

--> Processing Dependency: mysql-connector-python for package: mysql-utilities-1.0.1-0.5.2.34.fc14.noarch

---> Package pexpect.noarch 0:2.3-5.fc14 set to be installed

---> Package python-sqlite2.i686 1:2.3.5-3.fc14 set to be installed

---> Package tinyxml.i686 0:2.6.1-1.fc14 set to be installed

--> Running transaction check

---> Package mysql-connector-python.noarch 0:0.3.2-2.fc14 set to be installed

--> Finished Dependency Resolution

 

Dependencies Resolved

 

======================================================================================================================================

Package Arch Version Repository Size

======================================================================================================================================

Installing:

mysql-workbench i686 5.2.34-1.fc14 updates 14 M

Installing for dependencies:

ctemplate i686 0.97-1.fc14 fedora 156 k

libzip i686 0.9.3-2.fc13 fedora 39 k

mysql-connector-python noarch 0.3.2-2.fc14 updates 80 k

mysql-utilities noarch 1.0.1-0.5.2.34.fc14 updates 170 k

pexpect noarch 2.3-5.fc14 fedora 147 k

python-sqlite2 i686 1:2.3.5-3.fc14 fedora 79 k

tinyxml i686 2.6.1-1.fc14 fedora 47 k

 

Transaction Summary

======================================================================================================================================

Install 8 Package(s)

 

Total download size: 15 M

Installed size: 39 M

Is this ok [y/N]: y

Downloading Packages:

Setting up and reading Presto delta metadata

Processing delta metadata

Package(s) data still to download: 15 M

(1/8): ctemplate-0.97-1.fc14.i686.rpm | 156 kB 00:00

(2/8): libzip-0.9.3-2.fc13.i686.rpm | 39 kB 00:00

(3/8): mysql-connector-python-0.3.2-2.fc14.noarch.rpm | 80 kB 00:00

(4/8): mysql-utilities-1.0.1-0.5.2.34.fc14.noarch.rpm | 170 kB 00:00

(5/8): mysql-workbench-5.2.34-1.fc14.i686.rpm | 14 MB 01:10

(6/8): pexpect-2.3-5.fc14.noarch.rpm | 147 kB 00:00

(7/8): python-sqlite2-2.3.5-3.fc14.i686.rpm | 79 kB 00:00

(8/8): tinyxml-2.6.1-1.fc14.i686.rpm | 47 kB 00:00

--------------------------------------------------------------------------------------------------------------------------------------

Total 206 kB/s | 15 MB 01:12

Running rpm_check_debug

Running Transaction Test

Transaction Test Succeeded

Running Transaction

Installing : ctemplate-0.97-1.fc14.i686 1/8

Installing : tinyxml-2.6.1-1.fc14.i686 2/8

Installing : libzip-0.9.3-2.fc13.i686 3/8

Installing : 1:python-sqlite2-2.3.5-3.fc14.i686 4/8

Installing : mysql-connector-python-0.3.2-2.fc14.noarch 5/8

Installing : mysql-utilities-1.0.1-0.5.2.34.fc14.noarch 6/8

Installing : pexpect-2.3-5.fc14.noarch 7/8

Installing : mysql-workbench-5.2.34-1.fc14.i686 8/8

 

Installed:

mysql-workbench.i686 0:5.2.34-1.fc14

 

Dependency Installed:

ctemplate.i686 0:0.97-1.fc14 libzip.i686 0:0.9.3-2.fc13 mysql-connector-python.noarch 0:0.3.2-2.fc14

mysql-utilities.noarch 0:1.0.1-0.5.2.34.fc14 pexpect.noarch 0:2.3-5.fc14 python-sqlite2.i686 1:2.3.5-3.fc14

tinyxml.i686 0:2.6.1-1.fc14

 

Complete!

[root@local ~]#

我采用的是YUM源安装,当然,也可以自己手动下载编译安装。用YUM源安装方便快捷,综合上面的界面,也就是两行代码:

  • yum install mysql-server.i686
  • yum install mysql-workbench.i686

安装好之后,我们要查看下mysql的服务启动了没有,用如下命令:

  • service mysqld status
  • service mysqld start

[root@local ~]# service mysqld status  #查看mysql的服务状态

mysqld is stopped

[root@local ~]# service mysqld start  #启动mysql服务

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' #修改root用户的密码

/usr/bin/mysqladmin -u root -h local.ypf 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!

 

[ OK ]

Starting mysqld: [ OK ]

[root@local ~]#

下面,我们就修改下mysql的root用户的密码:

  • mysqladmin -u root password 'root'
[root@local ~]# mysqladmin -u root password 'root'  #修改密码为root 

[root@local ~]# mysql -u root

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

[root@local ~]# mysql -u root -p  #登录mysql的命令

Enter password:#输入密码root

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

Your MySQL connection id is 4

Server version: 5.1.58 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>

 

好了,现在我们已经登录进来了mysql,下面我们就去测试下我们的GUI的工具吧。

mysql-GUI的菜单

mysql-GUI的菜单

点击进去,如下界面:

MySQL Workbench首页面

MySQL Workbench首页面

点击右下角的New Connection:

Setup New Connection

Setup New Connection

在这个界面,输入相应的信息,点击OK,就可以新建一个连接了,然后在Open Connection to Start Querying下面单击新建的连接,就如下界面,一切ok。

MySQL Workbench-操作界面

MySQL Workbench-操作界面

好了,到这里就结束吧。

原创文章,转载请注明: 转载自勤奋的小青蛙
本文链接地址: fedora 14 mysql安装+mysql GUI安装

文章的脚注信息由WordPress的wp-posturl插件自动生成



|2|left
打赏

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: