You are here:
Home >Archive for the ‘
MySQL’ Category
Posted in
MySQL | February 23rd, 2012
Table of contents : What is MySQL grant? How to GRANT privileges to users Resources What is MySQL grant The MySQL database software offers both administrators and users a great amount of control options. You can learn more about the users’ MySQL management rights in our articles dedicated to the create-user, create-database, create-table and alter-table [...]
Tags: MySQL grant, user permissions, สิทธิ์ mysql
As a MySQL administrator, you’ll probably end up doing some preventive and corrective database maintenance. You can use mysqlcheck for both. First, consider the “virtual” database. It has one table called ‘accounts”. You can check the whole database with the following command: mysqlcheck -p -u root virtual Enter password: virtual.accounts OK Now, what if we [...]
Tags: MySQL Databases, mysqlcheck
Summary: MySQL provides several commands to allow you to maintain database table more efficiently. Those commands enable you to analyze, optimize, check, and repair the database tables. In this tutorial, you will learn those MySQL command to maintain database tables. Analyze table statement Basically analyze table statement allows you to update cardinality of an index column. [...]
Tags: MySQL, MySQL Maintaining
For more examples see perldoc DBI and perldoc DBD::mysql or online versions available at e.g. http://cpan.uwinnipeg.ca/htdocs/DBI/DBI.html. Note: For clarity, the following examples contain basic Perl code snippets which do not use my or other recommended practices. For happy Perl programming always use the pragma use strict; use warnings; at the start of your scripts. [...]
Tags: mysql Perl, perl connect mysql, Perl DBI
Posted in
MySQL | July 11th, 2011
Basic CREATE TABLE statement A very basic CREATE TABLE statement which should work in any SQL database: mysql> CREATE TABLE example ( id INT, data VARCHAR(100) ); Query OK, 0 rows affected (0.03 sec) Creating a table with a particular storage engine MySQL provides a variety of different table types with differing levels of functionality. [...]
Tags: CREATE TABLE, MySQL, SHOW CREATE TABLE, Statement, Viewing a table
Data Manipulation Language (DML) Statements Select Insert Delete Update Commit Rollback
Tags: Data Manipulation Language, DML
Data Definition Language (DDL) Statements Create Create Table Create View Create Index Create Synonym Create Role Alter Alter Table Alter Index Drop Grant Revoke
Tags: Data Definition Language, DDL, SQL Reference
บทความนี้จะเป็นวิธีการลบข้อมูลออกจากฐานข้อมูลที่ละหลายๆ rows โดยใช้ PHP & MySQL and HTML checkbox
Tags: checkbox, Deleting multiple, Deleting multiple rows, MySQL
การสำรองข้อมูลดาต้าเบส MySQL ปกติทั่วไปจะทำการ Backup MySQL ผ่าน phpMyAdmin แต่เนื่องด้วย phpMyAdmin มีข้อจำกัดเรื่องเวลาขนาดของข้อมูลที่มีขนาดใหญ่มากๆ ลองมาใช้ mysqldump เพราะน่าจะเป็นคำตอบที่ดีกว่า
Tags: BackingUp MySQL, Backup Compress, Compress, MySQL, MySQL Database, mysqldump, restore compressed backup, Restoring, Restoring MySQL
บทความนี้จะเป็นการ Backup MySQL Database อัตโนมัติด้วย Unix/Linux operating system. การสั่งให้ตัว Backup ทำงานผ่าน cron หรือ crontab โดยสามารถตั้งเวลาการทำงานได้ ดังตัวอย่างจะเป็นการ Backup ที่มีการกำหนดชื่อไฟล์ Backup ด้วยวันเดือนปีเข้าไปด้วย เพื่อความง่ายหรือสะดวกเวลาเราต้องการ Restored Database ครับ 15 2 * * * root mysqldump -u root -pPASSWORD –all-databases | gzip > disk/database_`data ‘%d-%m-%Y’`.sql.gz
Tags: Backup MySQL, cron, crontab, Linux, MySQL Database automatic, mysqldump, Unix