Show MySQL storage engines
To see the available/enabled MySQL storage engines first you must connect to your mysql server
$ mysql - u root - p - h SERVER
Then run
Show MySQL storage engines Read More »
To see the available/enabled MySQL storage engines first you must connect to your mysql server
$ mysql - u root - p - h SERVER
Then run
Show MySQL storage engines Read More »
MySQL offers several types of charset (CHARACTER_SET), thereby satisfying the most varied projects.
> SHOW CHARACTER SET; +----------+-----------------------------+--------------------- | Charset | Description | Default collation +----------+-----------------------------+-------------------- | big5 | Big5 Traditional Chinese | big5_chinese_ci | dec8 | DEC West European | dec8_swedish_ci | cp850 | DOS West European | cp850_general_ci | hp8 | HP West European | hp8_english_ci | koi8r | KOI8-R Relcom Russian | koi8r_general_ci | latin1 | cp1252 West European | latin1_swedish_ci | latin2 | ISO 8859-2 Central European | latin2_general_ci | swe7 | 7bit Swedish | swe7_swedish_ci | ascii | US ASCII | ascii_general_ci ....
> SELECT COLLATION_NAME FROM INFORMATION_SCHEMA.COLLATIONS WHERE CHARACTER_SET_NAME = 'utf8'; +--------------------+ | COLLATION_NAME | +--------------------+ | utf8_general_ci | | utf8_bin | | utf8_unicode_ci | | utf8_icelandic_ci | | utf8_latvian_ci | | utf8_romanian_ci | | utf8_slovenian_ci | ...
Here we take as an example the BD: Sakila
> SELECT COLUMN_NAME,COLLATION_NAME, CHARACTER_SET_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'actor' AND TABLE_SCHEMA = 'sakila'; +-------------+-----------------+--------------------+ | COLUMN_NAME | COLLATION_NAME | CHARACTER_SET_NAME | +-------------+-----------------+--------------------+ | actor_id | NULL | NULL | | first_name | utf8_general_ci | utf8 | | last_name | utf8_general_ci | utf8 | | last_update | NULL | NULL | +-------------+-----------------+--------------------+
– F. van der lan, Rick. SQL for MySQL Developers, Part III, Chapter 22.
Character set available in MySQL Read More »
MySQL has a refined security scheme, see MySQL: administration of users, but some time is necessary to allow a user to connect to our MySQL server from any computer on the Local Area Network, let's have a development server: devsrv and can make ssh:
Connect to a MySQL server from the LAN Read More »
MySQL has a flexible and refined security scheme based on access control list. A user in MySQL is identified by the login and ID of the client computer (IP, name), this is based on the principle that the user Pepe that connects from the office does not have to be the same Pepe that connects from the House. MySQL uses tables user, db, host, tables_priv, columns_priv, and procs_priv from mysql database to manage every user privileges allowing to define different level access: database, tables, columns, and operations (select, insert, delete, update, grant). In this guide we will show how create and delete users, establish and revoke permissions.
MySQL user administration Read More »
MySQL is a relational database server with a great reputation for being fast, consume few resources and adapt very well to the demands of the web. In this article we will show how to connect, from the command line, to a MySQL server, as well as create, list, select and delete a database as well as show information about tables and storage engines
mysql [-h mysql-server] -u user-name -p[password] [BD]
We encourage using the option -p instead of -ppassword, because the latter is less secure (password is saved in the history)
The default mysql server is localhost
create schema DB;
create database DB default character set = UTF8 default collate =utf8_general_ci;
schema is an alias for database command and can be used both interchangeably
show collation;
Or by specifying a specific charset
show collation like 'utf8%';
drop schema BD;
show schemas;
use DB;
show tables;
desc table-name;
show columns from table-name where Field='column-name'
show index from table-name;
show engines;
-man mysql
MySQL server administration – Basic Read More »
Yesterday I was doing some operations with the SELinux in the development server and from that moment the MySQL throws an error that couldn't write in /tmp dir, then I restarted the mysql server and check its log with:
MySQL can not write in the /tmp dir Read More »