HiveBrain v1.2.0
Get Started
← Back to all entries
patternsqlMinor

What program to use to change settings on db servers?

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
settingswhatserversprogramusechange

Problem

Having decided to set up a Master-Slave replication I found this article, which seems exactly what I want.

So I fired up the MySQL Console in Navicat to give everything a try, and the commands do nothing. So it seems one of these is the problem:

  • The MySQL Console is not the tool I want



  • The MySQL Console on Navicat is imperfect



  • I am doing it wrong



This is the first step in the article I linked:


/sbin/ifconfig

Does nothing on the remote server connection (using the Console in Navicat) but works fine on the MySQL Console on the WAMP Server on my local machine.

UPDATE:

next day - clear head - realize what I was trying to do is probably not possible and not necessary. Web site is hosted on some rackspace servers in California, and I doubt they want me messing around with their server settings.

I was trying to set up separate databases so that the write-heavy backend did not interfere with reads in the front end. This morning I reworked the calls which were causing table locks & now the slow backend queries should not lock any table required by the front end.

So basically problem solved. This why I should only post on here in the morning, not after 8-10 hours coding.

Solution

As a MySQL DBA, may I be so bold as to suggest my favorite tool?

The mysql client program itself

There are also a variety of startup options for the client program.

Examples:

-h hostname or host IP
-P port number
-u username
-p password
-e allows execution of a semicolon delimited list of SQL queries inside double quotes
--skip-column-names will suppress the column heading for output of SQL queries


You see all the options by doing this

mysql --help --verbose


You can see global variables and status in the mysql instance using SHOW GLOBAL VARIABLES; and SHOW GLOBAL STATUS; You can also see session variables and status in the db connection using SHOW VARIABLES; and SHOW STATUS;

Once you have successfully connected to the mysql instance, you have a wide variety of session and server options that you can set for the current session or permamnently for all new sessions.

Code Snippets

-h hostname or host IP
-P port number
-u username
-p password
-e allows execution of a semicolon delimited list of SQL queries inside double quotes
--skip-column-names will suppress the column heading for output of SQL queries
mysql --help --verbose

Context

StackExchange Database Administrators Q#2647, answer score: 3

Revisions (0)

No revisions yet.