Chinaunix首页 | 论坛 | 博客
  • 博客访问: 300441
  • 博文数量: 67
  • 博客积分: 2010
  • 博客等级: 大尉
  • 技术积分: 690
  • 用 户 组: 普通用户
  • 注册时间: 2005-03-27 10:27
文章分类

全部博文(67)

文章存档

2007年(11)

2006年(42)

2005年(14)

我的朋友

分类: LINUX

2006-07-08 20:49:49


新手入门之Redhat EL4+MYSQL
http://enjoy48.cublog.cn

1、查看环境
#rpm -qa|grep mysql
mysql-4.1.12-3.RHEL4.1
mysqlclient10-3.23.58-4.RHEL4.1
得知没有安装服务器端。
2、安装程序
插入光盘4
#mount /dev/cdrom
#cd /media/cdrom/RedHat/RPMS
#rpm -ivh perl-DBD-MySQL-2.9004-3.1.i386.rpm
#rpm -ivh mysql-server-4.1.12-3.RHEL4.1.i386.rpm
3、运行
#service mysqld start
系统出错提示:
Initializing MySQL database:  Neither host 'localhost.localdomain' nor 'localhoh
/usr/bin/resolveip
Please configure the 'hostname' command to return a correct hostname.
If you want to solve this at a later stage, restart this script with
the --force option
FAILED]
按照它的提示,我给自己取了个名字
#hostname redhat.test.com
再次运行:
#service mysqld start
Initializing MySQL database:    OK  ]
Starting MySQL:    OK  ]
此时mysql正常启动。
4、使用
在本机上输入客户端命令mysql即可进入到mysql中,具体参数可参见man mysql
#mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2 to server version: 4.1.12
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>
系统默认以root用户登陆,由于一开始root用户没有密码,故无须你输入密码。
更改密码:
# /usr/bin/mysqladmin -u root password 'root'
再次登陆时则须输入:
#mysql -u root -p
Enter password:
输入密码之后即进行mysql。进入之后注意每个命令均以分号结束,如:
mysql>show databases;
mysql> show tables;
mysql> select * from user;
更多信息请参考mysql手册。
文件: mysql.rar
大小: 1KB
下载: 下载
 
阅读(1852) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~