How to install and connect from a client to MySQL on Fedora
1. Install the rpm via yum with the following command: yum -y install mysql mysql-server
2. assign passwords to default accounts like this:
2a. switch to root account with: (usr/local/mysql/bin) mysql -u root
mysql> SET PASSWORD FOR ''@'localhost' = PASSWORD('newpwd');
mysql> SET PASSWORD FOR ''@'host_name' = PASSWORD('newpwd');
You can see the reference here.3. Create a database with the command: CREATE DATABASE dbname;
4. If you would like to connect from a client you must enter a row in the "user" table like this:
insert into mysql.user(Host, User) values ('192.168.1.2','root');
4a. You can also check if your desired host already exists in the user table by first switching to the root account and then issuing the query: SELECT Host, User FROM mysql.user;
5. You now need to grant permissions with the command: GRANT ALL PRIVILEGES ON *.* TO 'user'@'host' IDENTIFIED BY 'password' WITH GRANT OPTION;
5a. restart mysql with the command (as root): service mysqld restart
6. Tadah!!!!! You're running MySQL on Fedora and connecting to your new database from a client!!!
Labels: Technology
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home