You are here: Home >Archive for the ‘MySQL’ Category

MySQL grant user permissions

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: , ,

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • Twitter
  • RSS

Maintaining MySQL Databases mysqlcheck

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: ,

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • Twitter
  • RSS

MySQL Maintaining Database Tables

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: ,

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • Twitter
  • RSS

Perl DBI examples for DBD::mysql

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: , ,

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • Twitter
  • RSS

MySQL Basic CREATE TABLE statement

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: , , , ,

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • Twitter
  • RSS

Data Manipulation Language (DML) Statements

Data Manipulation Language (DML) Statements Select Insert Delete Update Commit Rollback

Tags: ,

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • Twitter
  • RSS

Data Definition Language (DDL) Statements

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: , ,

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • Twitter
  • RSS

Deleting multiple rows from mysql with checkbox

บทความนี้จะเป็นวิธีการลบข้อมูลออกจากฐานข้อมูลที่ละหลายๆ rows โดยใช้ PHP & MySQL and HTML checkbox

Tags: , , ,

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • Twitter
  • RSS

How to Back Up and Restore a MySQL Database

การสำรองข้อมูลดาต้าเบส MySQL ปกติทั่วไปจะทำการ Backup MySQL ผ่าน phpMyAdmin แต่เนื่องด้วย phpMyAdmin มีข้อจำกัดเรื่องเวลาขนาดของข้อมูลที่มีขนาดใหญ่มากๆ ลองมาใช้ mysqldump เพราะน่าจะเป็นคำตอบที่ดีกว่า

Tags: , , , , , , , ,

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • Twitter
  • RSS

How to Backup MySQL Database automatically (for Unix/Linux operating system)

บทความนี้จะเป็นการ 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: , , , , , ,

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • Twitter
  • RSS