Results 1 to 3 of 3
Threaded View
-
20th Feb 2012, 09:00 AM #1OPMemberWebsite's:
AVANETCO.COM AVAVPS.COMWorking with mysql-(1)
Create mysql database
To create database,
PHP Code:create database DB_NAME
PHP Code:mysql> create database video_vshare;
Query OK, 1 row affected (0.01 sec)
mysql>
Creating mysql user account
To create a mysql user with all privileges on all databases.
PHP Code:GRANT ALL ON *.* TO 'USER_NAME'@'localhost' IDENTIFIED BY 'PASSWORD_HERE';
GRANT ALL ON *.* TO 'USER_NAME'@'%' IDENTIFIED BY 'PASSWORD_HERE';
Create a user with permission to only one database.
PHP Code:GRANT ALL ON DB_NAME.* to 'USER_NAME'@'localhost' IDENTIFIED BY 'PASSWORD_HERE';
Create MySQL User who can only Manage His Own DB
PHP Code:grant create on *.* to 'user'@'localhost' identified by 'pass';
FLUSH PRIVILEGES
To repair table, you use to use the database.
PHP Code:mysql
use freebb
PHP Code:mysql> check table mithridates_sessions;
+-----------------------------+-------+----------+----------------------------------------------------------+
| Table | Op | Msg_type | Msg_text |
+-----------------------------+-------+----------+----------------------------------------------------------+
| mithridates_sessions | check | warning | Table is marked as crashed |
| mithridates_sessions | check | warning | 6 clients are using or havent closed the table properly |
| mithridates_sessions | check | error | Record at pos: 9519 is not remove-marked |
| mithridates_sessions | check | error | record delete-link-chain corrupted |
| mithridates_sessions | check | error | Corrupt |
+-----------------------------+-------+----------+----------------------------------------------------------+
5 rows in set (0.05 sec)
We found the table Corrupt, so repair it with repair table command.
PHP Code: mysql> repair table mithridates_sessions;
+-----------------------------+--------+----------+--------------------------------------+
| Table | Op | Msg_type | Msg_text |
+-----------------------------+--------+----------+--------------------------------------+
| mithridates_sessions | repair | warning | Number of rows changed from 94 to 95 |
| mithridates_sessions | repair | status | OK |
+-----------------------------+--------+----------+--------------------------------------+
2 rows in set (0.17 sec)
mysql>
Albert.Nawaro Reviewed by Albert.Nawaro on . Working with mysql-(1) Create mysql database To create database, create database DB_NAME For example Rating: 5
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Working with mysql-(3)
By Albert.Nawaro in forum Server ManagementReplies: 0Last Post: 20th Feb 2012, 09:26 AM -
Working with mysql-(2)
By Albert.Nawaro in forum Server ManagementReplies: 0Last Post: 20th Feb 2012, 09:23 AM -
MYSQL Error while Import via MYSQL Dumper (Error
By desibreaker in forum Server ManagementReplies: 10Last Post: 5th Aug 2011, 07:26 PM -
MySQL help
By kos in forum vBulletinReplies: 4Last Post: 29th Jun 2011, 12:30 PM -
DLE MySQL help
By John in forum Webmaster DiscussionReplies: 4Last Post: 17th May 2011, 06:51 PM
themaCreator - create posts from...
Version 3.47 released. Open older version (or...