of 10

SQL in a server

Published on May 2018 | Categories: Documents | Downloads: 2 | Comments: 0
122 views

Comments

Content

SQL in a server 

System Preferences •

64-Bit



High Memory



Multiple core CPU



Multiple CPU



Quality network devices



Server OS

Other Settings •





key_buffer_size (30% of total RAM recommended; 4GB Max. Memory query_cache_size (32M512M) read_buffer_size, read_rnd_b uffer_size (around 1-6MB)

Setup Setting up for a mysql server is much like the one in a developer machine but with different settings

A developer machine accesses the mysql server locally. Database server has clients that can connect to that server

ns ance Configuration Mysql servers have a limited of allocated concurrent connections to limit the stress of the server.

The server must have secure passwords. Root access from remote machines allows other machines to access the root account

Reminders





Update firewall rules to make sure port# is available in this case port 3306 Make sure the port number is consistent or known with the client applications

<http://www.tutorialspoint.com/mysql/mysql-administration.htm>

Granting user permissions The root can also grant users on what to do Sample code for granting access to the database GRANT SELECT,UPDATE,INSERT ON Database.* TO ‘username'@‘host ' IDENTIFIED BY ‘Password‘  GRANT SELECT,UPDATE,INSERT ON weblounge.* TO ‘ userx '@'%' IDENTIFIED BY ‘x‘ 

FLUSH PRIVILEGES; // to be used after grant

Client calling to the server  In this example the a mysql client is calling for the host though the ip address.

Another way is if the client knows the hostname

Other commands for remote user:

USE Databasename : This will be used to select a particular database SHOW DATABASES: Lists the databases that are accessible SHOW TABLES: Shows the tables in the database once a database has been selected SHOW COLUMNS FROM tablename: Shows the attributes, types of attributes, key information, whether NULL is permitted, defaults, and other information for a table. SHOW INDEX FROM tablename : Presents the details of all indexes on the table, including the PRIMARY KEY. SHOW TABLE STATUS LIKE tablename \G: Reports details of the MySQL DBMS performance and statistics. •











http://www.tutorialspoint.com/mysql/mysql-administration.htm

Back-up mysqldump -u <username> -p <database> > file.sql mysqldump -u root -p sampleDB file.sql > dump.sql

Recovery mysql -u admin -p vworks < vworks.sql

References http://whatis.techtarget.com/definition/server http://www.sequelpro.com/docs/Connecting_to_a_MySQL_Server_on_a_Remote_Host http://chosencollective.com/technology/how-to-enable-remote-access-to-mysql http://richbui.com/2009/03/06/how-to-enable-remote-access-to-mysql-server-on-windows-server/ http://dev.mysql.com/doc/refman/5.1/en/server-options.html#option_mysqld_skip-networking http://www.webhostingtalk.com/showthread.php?t=583298 http://www.tutorialspoint.com/mysql/mysql-administration.htm http://www.devshed.com/c/a/MySQL/MySQL-Server-Tuning-Tips-and-Tricks/2/

Sponsor Documents

Or use your account on DocShare.tips

Hide

Forgot your password?

Or register your new account on DocShare.tips

Hide

Lost your password? Please enter your email address. You will receive a link to create a new password.

Back to log-in

Close