Recent Changes - Search:

Softwares

.

MySQLServer

Main.MySQLServer History

Hide minor edits - Show changes to output

July 05, 2006, at 12:17 AM by 210.18.59.46 -
Added lines 170-198:

EXAMPLES
The most normal use of mysqldump is probably for making a backup
of whole databases. See Mysql Manual section 21.2 Database Back-
ups.

mysqldump --opt database > backup-file.sql

You can read this back into MySQL with:

mysql database < backup-file.sql

or




with information from a database:

mysqldump --opt database | mysql --host=remote-host -C database

It is possible to dump several databases with one command:

mysqldump --databases database1 [ database2 database3... ] >
my_databases.sql

If all the databases are wanted, one can use:

mysqldump --all-databases > all_databases.sql
July 05, 2006, at 12:15 AM by 210.18.59.46 -
Added lines 164-169:
%blue%How can I backup a MySQL database?

mysqldump -u $mysqlusername -p$mysqlpassword $mysqldatabasename > backupdb.sql
Not that there is no space after the -p

mysqldump -u user -p --opt database > backup_dbfilename
June 03, 2006, at 05:46 AM by 210.18.59.46 -
Added lines 3-6:
%red%Linux - MySQL Server Downloads.

%newwin%[[http://mysql.mirrors.hoobly.com/Downloads/]]
Added lines 89-114:
mysql> use mysql;
mysql> SELECT Host, User FROM mysql.user;
+---------------+------+
| Host | User |
+---------------+------+
| hcl.armia.com | |
| hcl.armia.com | root |
| localhost | |
| localhost | root |
+---------------+------+
4 rows in set (0.05 sec)

%blue%OR
mysql> describe user;

mysql> select host,User from user;
+---------------+------+
| host | User |
+---------------+------+
| hcl.armia.com | |
| hcl.armia.com | root |
| localhost | |
| localhost | root |
+---------------+------+
4 rows in set (0.00 sec)
Added lines 81-88:
%blue%Securing the MySQL

To use SET PASSWORD on Unix, do this:

# mysql -u root
mysql> SET PASSWORD FOR ''@'localhost' = PASSWORD('newpwd');
mysql> SET PASSWORD FOR ''@'host_name' = PASSWORD('newpwd');
Added lines 57-80:
%blue%Retrieve information from the server.

[root@hcl ~]# mysqlshow mysql
Database: mysql
+---------------------------+
| Tables |
+---------------------------+
| columns_priv |
| db |
| func |
| help_category |
| help_keyword |
| help_relation |
| help_topic |
| host |
| tables_priv |
| time_zone |
| time_zone_leap_second |
| time_zone_name |
| time_zone_transition |
| time_zone_transition_type |
| user |
+---------------------------+
Added lines 22-23:
%blue%mysql_install_db
Changed lines 25-26 from:
to:
Typically, mysql_install_db needs to be run only the first time
Added lines 31-56:

%blue%Start the MySQL server:

mysqld_safe --user=mysql &

%blue%Use mysqladmin to verify that the server is running.

mysqladmin version
mysqladmin variables

%blue%Shut down the server:

mysqladmin -u root shutdown

%blue%Shut down the server:

mysqld_safe --user=mysql --log &

[root@hcl ~]# mysqlshow
+-----------+
| Databases |
+-----------+
| mysql |
| test |
+-----------+
Deleted line 13:
Added lines 22-28:
On Linux, the grant tables are set up by the mysql_install_db program.

[root@hcl html]# which mysql
/usr/bin/mysql
[root@hcl html]# which mysql_install_db
/usr/bin/mysql_install_db
Added lines 64-72:

By default, MySQL creates MyISAM tables with an internal structure that allows a maximum size of about 4GB. You can check the maximum table size for a MyISAM table with the SHOW TABLE STATUS

%blue%MaxDB

MaxDB is a heavy-duty enterprise database. MaxDB is the new name of a database management system formerly called SAP DB. MaxDB runs as a client/server system. MySQL can run as a client/server system or as an embedded system.

MaxDB and MySQL are independent database management servers.
Added lines 22-57:

MySQL Server has built-in support for SQL statements to check, optimize, and repair tables. These statements are available from the command line through the mysqlcheck client. MySQL also includes myisamchk, a very fast command-line utility for performing these operations on MyISAM tables.

%blue%Commands

mysql mysqladmin mysqlcheck mysqldump mysql_find_rows mysqlshow
mysql_waitpid mysqlaccess mysqlbinlog mysql_config
mysqlimport mysql_tableinfo mysqldumpslow

%blue%myisamchk --help

Description, check and repair of MyISAM tables.

-r, --recover Can fix almost anything except unique keys that aren't unique.
Used without options all tables on the command will be checked for errors

Usage: myisamchk [OPTIONS] tables[.MYI]


%blue%mysqlcheck --help

This program can be used to CHECK (-c,-m,-C), REPAIR (-r), ANALYZE (-a)
or OPTIMIZE (-o) tables. Some of the options (like -e or -q) can be
used at the same time.

The option -c will be used by default, if none was specified. You
can change the default behavior by making a symbolic link, or
copying this file somewhere with another name, the alternatives are:

mysqlrepair: The default option will be -r
mysqlanalyze: The default option will be -a
mysqloptimize: The default option will be -o

Usage: mysqlcheck [OPTIONS] database [tables]
OR mysqlcheck [OPTIONS] --databases DB1 [DB2 DB3...]
OR mysqlcheck [OPTIONS] --all-databases
Added lines 1-21:
%red%MySQL Server.

%blue%The complete installation of mysql on a linux server requires the following packages.

MySQL-server -- the actual mysql database engine
MySQL-client -- the interactive character based mysql client
MySQL-shared -- the shared library that mysql needs
MySQL-shared-compact -- for backward compatibility
MySQL-embedded -- the embedded mysql library
MySQL-devel --
MySQL-bench -- requires perl and DBD::mysql module
MySQL-Max -- includes Innodb tables


%blue%The Max package is required if InnoDB or BDB table data file types are to be used in addition to the standard MyISAM table data file type


%blue%Please remember to set a password for the MYSQL root USER!

/usr/bin/mysqladmin -u root password 'new password'
/usr/bin/mysqladmin -u root -h localhost.localdomain password 'new password'
Edit - History - Print - Recent Changes - Search
Page last modified on July 05, 2006, at 12:17 AM