Re: Rename/Copy a Table????
RENAME TABLE tbl_name TO new_tbl_name[, tbl_name2 TO new_tbl_name2,...] you can find it from MYSQL MANUAL section RENAME TABLE SYNTAX (I tried to post this once, but it didn't show up - sorry if this is a duplicate!) Can you rename a table? If so, how? If not, is there an easy query to run to copy a table? (Preserving the data as well as the structure, of course.) Couldn't find it in my MySQL on-line manual... -- Mark Wilson, Computer Programming Unlimited (cpuworks.com) Web : http://cpuworks.com Tel: 410-549-6006 Email: [EMAIL PROTECTED] Fax: 410-549-4408 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Rename table?
If you use PHP program like below... ? $conn = mysql_connect($host,$user,$pass) if(!$conn) exit; mysql_select_db($dbname); $query = rename table old_table to new_table; $res = mysql_query($query, $conn); if(!$res) { echo(Rename table failed); exit; } echo(Rename table successfully !!!); ? It's simple OK ? if you use other programming language, It's similar to above example. Sorry, My english is so poor -_-;; Is it possible to rename a MySQL table? If so, how? If not, is there a simple query syntax to copy a table? I don't have access to the command-line version, just a web interface, and no, not anything nice like PhpMyAdmin! :-( -- Mark Wilson, Computer Programming Unlimited (cpuworks.com) Web : http://cpuworks.com Tel: 410-549-6006 Email: [EMAIL PROTECTED] Fax: 410-549-4408 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Cannot add new user to newly created database, help needed
mysql use mysql; mysql update user set grant_priv = 'Y' where user = 'root'; mysql flush privileges and reconnect to mysql server as root user and retry grant clause. You'll be happy!!! ^^ Greetings, I'm trying to create a database and then adding a specialized user so it can work with it, but so far i got no luck: [EMAIL PROTECTED] josevnz]$ mysql -u root -p -h localhost.localdomain Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 11 to server version: 4.0.12 Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql use mysql; Database changed mysql CREATE DATABASE test_cvebrowser; Query OK, 1 row affected (0.00 sec) mysql GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP ON test_cvebrowser.* TO 'test_cvebrowser_user''localhost.localdomain' IDENTIFIED BY 'cv3br0ws3r'; ERROR 1044: Access denied for user: '[EMAIL PROTECTED]' to database 'test_cvebrowser' mysql Any ideas what's wrong? (must be something pretty simple, but no cigar so far). I don't understand why the error if i managed to connect the first time. I'm using: - Redhat Linux 8.0 - MySQL 4.0.12 (fresh install) PD: I already checked the documentation at 'http://www.mysql.com/doc/en/Database_use.html', but no luck. Thanks in advance, JV. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]