mysql 安装(各种不同版本)

linux-6r89:/usr/local # rpm -ivh MySQL-server-community-6.0.10-0.sles10.i586.rpm
Preparing...                ########################################### [100%]
   1:MySQL-server-community ########################################### [100%]
mysql                     0:off  1:off  2:on   3:on   4:on   5:on   6:off
090422 17:01:19 [Note] Falcon: unable to open system data files.
090422 17:01:19 [Note] Falcon: creating new system data files.
090422 17:01:21 [Warning] Forcing shutdown of 2 plugins
090422 17:01:22 [Warning] Forcing shutdown of 2 plugins

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 linux-6r89 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!

The latest information about MySQL is available at http://www.mysql.com/
Support MySQL by buying support/licenses from http://shop.mysql.com/

Starting MySQL.                                                       done
Giving mysqld 2 seconds to start




/usr/bin/mysqladmin -u root password newpassword  //changepwd


mysqld_safe --user=mysql --skip-grant-tables --skip-networking &

/usr/bin/mysqladmin variables  //see character



linux-q1og:/usr/local # rpm -ivh MySQL-server-community-5.1.37-0.sles10.i586.rpm
Preparing...                ########################################### [100%]
   1:MySQL-server-community ########################################### [100%]
mysql                     0:off  1:off  2:on   3:on   4:on   5:on   6:off
090824 23:49:14 [Warning] Forcing shutdown of 2 plugins
090824 23:49:14 [Warning] Forcing shutdown of 2 plugins

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 linux-q1og 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!

The latest information about MySQL is available at http://www.mysql.com/
Support MySQL by buying support/licenses from http://shop.mysql.com/

Starting MySQL.                                                       done
Giving mysqld 2 seconds to start



rpm -qa | grep -i mysql

MySQL-server-community-5.1.37-0.sles10
linux-q1og:/ # rpm -ev MySQL-server-community-5.1.37-0.sles10
mysql                     0:off  1:off  2:off  3:off  4:off  5:off  6:off



linux-q1og:/usr/local # rpm -ivh MySQL-server-community-5.0.85-0.sles10.i586.rpm
Preparing...                ########################################### [100%]
   1:MySQL-server-community ########################################### [100%]
mysql                     0:off  1:off  2:on   3:on   4:on   5:on   6:off
ERROR: 1136  Column count doesn't match value count at row 1
090824 17:48:07 [ERROR] Aborting

090824 17:48:07 [Note] /usr/sbin/mysqld: Shutdown complete

Installation of system tables failed!

Examine the logs in /var/lib/mysql for more information.
You can try to start the mysqld daemon with:
/usr/sbin/mysqld --skip-grant &
and use the command line tool
/usr/bin/mysql to connect to the mysql
database and look at the grant tables:

shell> /usr/bin/mysql -u root mysql
mysql> show tables

Try 'mysqld --help' if you have problems with paths. Using --log
gives you a log in /var/lib/mysql that may be helpful.

The latest information about MySQL is available on the web at
http://www.mysql.com
Please consult the MySQL manual section: 'Problems running mysql_install_db',
and the manual section that describes problems on your OS.
Another information source is the MySQL email archive.
Please check all of the above before mailing us!
And if you do mail us, you MUST use the /usr/bin/mysqlbug script!
Starting MySQL.                                                       done
Giving mysqld 2 seconds to start
linux-q1og:/usr/local # rpm -ivh MySQL-client-community-5.0.85-0.sles10.i586.rpm
Preparing...                ########################################### [100%]
   1:MySQL-client-community ########################################### [100%]
linux-q1og:/usr/local # mysql -u root
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.0.85-community MySQL Community Edition (GPL)

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>


/usr/bin/mysqladmin -u root password 123456;  //change password


mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%'WITH GRANT OPTION;
Query OK, 0 rows affected (0.00 sec)

mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)

mysql> EXIT;
Bye


GRANT ALL PRIVILEGES ON *.* TO 'root'@'192.168.1.1' IDENTIFIED BY 'zpark' WITH GRANT OPTION;

你可能感兴趣的:(mysql,linux,Web,OS)