RE: Permissions block database creation
You need to set GRANTs to create on the host. http://dev.mysql.com/doc/refman/5.0/en/grant.html -Original Message- From: Doug Pinkerton [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 14, 2006 1:26 PM To: mysql@lists.mysql.com Subject: Permissions block database creation I'm a total newbie working through the tutorial in DuBois's _MySQL_. I've got MySQL running on my PowerBook. In Terminal, I can use the mysql client to get responses to things like SELECT NOW(). But the command CREATE DATABASE sampdb; results in the following error. ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'sampdb' mysql I am unable to determine its location, which causes me to suspect that it is in the portion of the system not accessible from the Finder. Can anyone offer a suggestion? Mac OS 10.4.5 Thanks, dp -- 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: Changing the binlog dir
Well, I supposed that your slave is broken from now, because your bin-log is not the exact situation of your databases. So: 1) no. If your slave is stopped for a abrupt lost of connection to your master, the old binlogs cannot do anything about. You need to copy the databases from your master to your slave before start it, and, with this, have a real database replication. 2) no. When you started, mysqld will create a new for you. 3) yes. Stop the slaves to copy the databases and rebuild your replication. -Original Message- From: Jeff [mailto:[EMAIL PROTECTED] Sent: Monday, March 06, 2006 12:00 PM To: mysql@lists.mysql.com Subject: Changing the binlog dir Hello all, I had a problem last night where my Master server filled up the /var/ partition and stopped logging to the bin log. This caused all sorts of havok on my slaves and replication. My bad for not watching this but now what I'd like to do is move where MySQL writes the binlog to. Currently it's in the default /var/lib/mysql but I'd like to move it where I actually have the database files which is on a much larger partition. From what I've read I can put --log-bin=/data/hostname-bin into the my.cnf and restart the mysql server. Questions: 1) do I have to move the old binlogs to the /data/ prior to restarting mysql 2) should I move the binlog index as well? 3) will moving the binlog location throw the slaves off? Thanks, Jeff -- 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: 'Into outfile' doesn't include the column names. How can it be done?
Maybe, if you make a file with the SELECT content and call them from the OS shell, like this: example of the content of the my_file SELECT table1.a, tabela1.b, table1.c FROM mydatabase.table; After, call this file from the OS shell: shellmysql -A mydatabase my_file This will result on the screen. You can direct the result to a file: shellmysql -A mydatabase my_file my_table.sql If you need the tabs, do with -t on the options: shellmysql -A -t mydatabase my_file my_table.sql -Original Message- From: Ariel Sánchez Mora [mailto:[EMAIL PROTECTED] Sent: Monday, March 06, 2006 5:12 PM To: mysql@lists.mysql.com Subject: 'Into outfile' doesn't include the column names. How can it be done? When using select into outfile, I can only get the table data, but I can't find how to include the column names. I haven't been able to include the column names into the actual return of the query, and they don't get stored in the .csv Anyone know how to include the column names, table name, other info, as an actual answer from MySQL? I realize that when I use the command line I can see the column names, but this is not the case when using, for example, Delphi, and my real problem, when the outfile is made. I use SQLyog for exporting to csv and they do include the columns, my bet is its some SQL option. The manual doesn't specify, at least in the select syntax part. Ariel -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: mysqldump backup on filters
Your table is missing. Try this: ?mysqldump --single-transaction -u root clientdb table --where=FLD_CLIENT_ID=1 client1_dbbackup.sql -Original Message- From: Rithish Saralaya [mailto:[EMAIL PROTECTED] Sent: Thursday, March 02, 2006 1:23 PM To: MySQL general mailing list Subject: mysqldump backup on filters Hello. We have a database driven system that serves multiple clients. We have a single database for this purpose. The data(rows) in some of the tables are specific to individual clients. In all such tables, we have a field FLD_CLIENT_ID whose value depicts the client to whom that row of information corresponds to. All other tables in the system, are agnostic to client information; but are required for the system to function as a whole. I would want to take seperate backups for individual clients. I try to use mysqldump to generate a dump file by filtering on the FLD_CLIENT_ID column. However, since not all tables contain the FLD_CLIENT_ID column, mysqldump fails. I use mysqldump from the commandline as --- ?mysqldump --single-transaction -u root clientdb --where=FLD_CLIENT_ID=1 client1_dbbackup.sql --- The error that is thrown is --- mysqldump: Couldn't execute 'SELECT /*!40001 SQL_NO_CACHE */ * FROM `ACCOUNT` WHERE FLD_CLIENT_ID=1': Unknown column FLD_CLIENT_ID' in 'where clause' (1054) --- which means thats the dump can't be created as the table ACCOUNT does not contain the column FLD_CLIENT_ID. Is it possible to write the where clause such that it should apply the FLD_CLIENT_ID filter only if the column exists in the table; and if not, dump the data anyways. I am on RHEL - MySQL 4.1.11 - Storage engine INNoDB Regards, Rithish. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: Want mysql to return tablename.fieldname format
Yes. You can add on SELECT syntax the AS operation, like this: SELECT ads.id AS 'ads.id', track.id AS 'track.id' FROM . -Original Message- From: Ryan Stille [mailto:[EMAIL PROTECTED] Sent: Thursday, March 02, 2006 2:42 PM To: mysql@lists.mysql.com Subject: Want mysql to return tablename.fieldname format I am working with an existing compilcated query someone wrote years ago. When I dump the data from the query to try to figure out why I'm getting unexpected data, I have three fields named id. Is there anyway to tell mysql to name the fields with the table name when they are returned, so they show up as ads.id, track.id, etc? -Ryan -- 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]