mysql server

A Video Tutorial on MySQL High Availability Solutions

There are many ways to ensure the availability of a MySQL Server and how to provide redundancy and fault-tolerance. In this talk, Lenz will give an overview over some best practices and commonly used HA setups for MySQL. The talk will cover the commonly used Open Source components and tools, with a focus on Linux [...]

How to Backup the entire Mysql Server Databases

To backup the entire database of a Mysql Server use the mysqldump command, Please look at the below stated command.In that we are backing up the entire database to a file called dump_file21102009 mysqldump -u root -p –all-databases –master-data=2 > dump_file21102009

How to view the running process of a MySQL Server

To view thw running process of Mysql server is very simple. Just login to the console of Mysql and type show processlist; # mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 2703 Server version: 5.0.50sp1-enterprise-gpl-log MySQL Enterprise Server (GPL) Type ‘help;’ [...]

How To Get Help Information from the MySQL Server?

While you are at the “mysql>” prompt, you can get help information from the server by using the “HELP” command. The tutorial exercise below shows sevearal examples: >cd \mysql\bin >mysql -u root mysql> HELP; … List of all MySQL commands: Note that all text commands must be end with ‘;’ ? (\?) Synonym for `help’. [...]

How to Start Mysql server automatically at system startup time

The mysql.server and safe_mysqld scripts can be used to start/stop the server automatically. shell> mysql.server start shell> mysql.server stop See mysql.server in the `share/mysql’ directory or in the `support-files’ directory of the MySQL source tree. The mysql.server script understands the following options: datadir, basedir, and pid-file. If your system uses `/etc/rc.local’ to start external scripts, [...]

How to setup a MySQL replicating cluster

Be sure your mysql servers are running the same version before starting this guide, yes, is possible to have a few combinations of master-slave versions, for more information about this you can check: http://dev.mysql.com/doc/refman/4.1/en/replication-compatibility.html 1 – Write down which is the setup you are going to do, which server is master and which server/s will be slave. [...]

How to Speed Up Your Web Site With MySQL Query Caching

One of the best ways to speed up your web application is to enable query caching in your database, which caches commonly used SQL queries in memory for virtually instant access by the next page that makes the same request. The reason this method is so powerful is that you don’t have to make any [...]

How to Optimize MySQL server

MySQL Performance Tips Optimizing a MySQL server is probably not very easy. It depends on your database structure, how many users are accessing your server and so on. Basics But there are a few things which could help to improve your performance. On my configuration I’ve added skip-name-resolve in my.cnf: [mysqld] skip-name-resolve Now the MySQL [...]

How to access MySQL server from the command line

MySQL software includes mysql client. It is a text-based client for mysqld, a SQL-based relational database server. Genreal syntax: mysql -u {mysql-user} -p {mysql-password} -h {mysql-server} Where, -u {mysql-user} : Specify MySQL user name. Use root only when connecting to local system. -p {mysql-password}: Specify password, Employ the specified password when connecting to the database [...]

How to change the mysql port

To change the port, select the “my.cnf file.  Change it to whatever you like and remove the # from the front. Then restart the engine and you should be set for that. Open /etc/my.cnf file: # vi /etc/my.cnf Set new port 5123: port=5123 Here is is my sample /etc/my.cnf file: [mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock port=5123 old_passwords=1 [...]

How to Optimize and repair all mysql databases at once

There is a really handy MySql utility called mysqlcheck that allows you to do a number of actions to all databases on your mysql server at once. I am writing this specifically for Linux, but I’m sure windows and Unix versions are very similar if not exactly the same. Run this command as root Repair [...]

Can’t connect to MySQL server

A MySQL client on Unix can connect to the mysqld server in two different ways: By using a Unix socket file to connect through a file in the file system (default /tmp/mysql.sock), or by using TCP/IP, which connects through a port number. A Unix socket file connection is faster than TCP/IP, but can be used only when connecting [...]

How to Secure MySQL Against Attackers

When you connect to a MySQL server, you should use a password. The password is not transmitted in clear text over the connection. Password handling during the client connection sequence was upgraded in MySQL 4.1.1 to be very secure. If you are still using pre-4.1.1-style passwords, the encryption algorithm is not as strong as the [...]

How to authenticate users against your Apache website by using MySQL

This tutorial will explain how to use a MySQL backend in order to authentication users against your Apache website. To achieve this we will use Apache2 and its auth_mysql module. Here, we will assume that you already have a website configured, up and running and that you also have access to a mysql server. The [...]