如果出现其他页面,则端口被占用,需要修改 TOMCAT 的端口号。作者: astrolto 时间: 2009-11-9 10:59 标题: MYSQL 在Linux下的安装 (1) 执行"groupadd mysql"添加组mysql用户组。在mysql 组下增加 mysql 用户
[root@localhost etc]# groupadd mysql
[root@localhost etc]# useradd -g mysql mysql
执行后查看确认
[root@localhost etc]# cd /home/
[root@localhost home]# ll
total 32
drwx------ 2 root root 16384 Oct 25 2009 lost+found
drwx------ 2 lto lto 4096 Oct 25 2009 lto
drwx------ 2 mysql mysql 4096 Oct 25 01:01 mysql
(2) 在opt 目录下解压mysql安装文件
[root@localhost opt]# tar -zxvf mysql-5.0.0-alpha.tar.gz
(6)修改相应文件的主属,和组属
[root@localhost bin]# chown -R root .
[root@localhost bin]# chown -R mysql var
[root@localhost bin]# chgrp –R mysql .
(7)以 mysql 的身份启动数据库
[root@localhost bin]./bin/mysqld_safe --user=mysql
结果:
091025 23:50:49 mysqld_safe Logging to '/opt/mysql/var/localhost.localdomain.err'.
091025 23:50:50 mysqld_safe A mysqld process already exists
(8)验证数据库的安装 (默认安装后 root 是没有密码的 进入数据库直接回车)
[root@localhost bin]# ./mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 5
Server version: 5.1.30 Source distribution
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.