![]() ![]() MySQL ( / ˌ m aɪ ˌ ɛ s ˌ k juː ˈ ɛ l/) is an open-source relational database management system (RDBMS). This is more specific to Oracle Virtual Box.Linux, Solaris, macOS, Windows, FreeBSD If you are running this server in a virtual box environment, make sure that you do port forwarding (NAT Only) to pass through 3306 database port to guest VM which can be done by going to settings of your VM > Network > Advanced > Port forwarding. Simply open a database client that you installed and provide the new super user/password that you created and the host-name/ip of this server and there you will be in your new database server. Now you are ready to connect to this database server from any host in your network. Last but not least make sure that this new MySQL server is enabled to auto start when server restarts. To restart iptables, simply run the following command : service iptables restart Save and exit out of the file and restart iptables for the new rule to take effect. First get out of the mysql command line client and to add a new firewall rule to your CentOS database server firewall rules and to do that edit vi /etc/sysconfig/iptablesįile and add the following line: -A INPUT -m state -state NEW -m tcp -p tcp -dport 3306 -j ACCEPT Before you can do that, make sure that your server firewall rules are updated for granting this server to respond at port 3306 for outside world. Now we can use this newly created user to access this database server from outside world. CREATE USER IDENTIFIED BY 'opensourcedbmsadmin' GRANT ALL ON *.* TO WITH GRANT OPTION Its not a good practice to grant root user access to outside world. mysql -uroot -pĬreate a super user to access database server from outside server. Login with root and when prompted for password please provide the password that you have set for root user in the earlier step. Now lets login into the database server to create a super user for granting outside world access to the databases. usr/bin/mysqladmin -u root password 'opensourcedbms' Also there are other root users in MySQL if you are familiar with its users table [ once you login with superuser you can update all of them later. Replace this password to what ever you desire. ![]() To set the root user password run the following command as showed below. Now before logging into database server using MySQL client utility, we need to set the database root user password. To do that we need to start our newly installed database server. Its all done, lets set some passwords, create user and grant access to outside clients for accessing the database. Please report any problems with the /usr/bin/mysqlbug script! Strongly recommended for production servers. Which will also give you the option of removing the testĭatabases and anonymous user created by default. usr/bin/mysqladmin -u root -h opensourcedbms password ‘new-password’ usr/bin/mysqladmin -u root password ‘new-password’ To do so, start the server, then issue the following commands: PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER ! Preparing… # ġ:MySQL-shared # ~]# rpm -ivh MySQL-server-5.5.86_64.rpmġ:MySQL-server # Start with shared libraries first and then work towards installing server and client utilities at the very end. Make sure that Perl is installed on your server before you install MySQL, if not MySQL server rpm will complain that it cannot be installed. Now start installing rpm’s onto your server: 6 (x86, 64-bit), RPM Package – Client Utilities : MySQL-client-5.5.86_64.rpmĪlternatively to directly download on command line yum install wgetĭownload the rpm’s command line with the following wget commands. 6 (x86, 64-bit), RPM Package – Shared components : MySQL-shared-5.5.86_64.rpm You want to download these rpm’s to your CentOS 6 server : First head over here and download MySQL 5.5.30 rpm’s under Oracle & Redhat Linux 6 platform section of rpm’s. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |