Re: help with mysql db names
On 2013-04-19, Doug d...@hacks.perl.sh wrote: why these db names created fail but the last one gets success? [snips] mysql create database 3208e1c6aa32; mysql create database 208e1c6aa32; mysql create database 08e1c6aa32; mysql create database 8e1c6aa32; mysql create database e1c6aa32; https://dev.mysql.com/doc/refman/5.5/en/identifiers.html You could try quoting your db names and see if you have any more success. --keith -- kkel...@wombat.san-francisco.ca.us -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql
Re: MySQL on RHEL4
On 2013-04-05, Nitin Mehta ntn...@yahoo.com wrote: However, i'm not sure which case it is because in the downloads, it says Platform: Oracle and Redhat 45 Isn't it supposed to work? The downloads section is titled Oracle and Red Hat 4 and 5, but each individual download is clearly marked as just 5. (I agree that the title of the section is misleading.) So no, it is not supposed to work. --keith -- kkel...@wombat.san-francisco.ca.us -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql
Re: MySQL on RHEL4
On 2013-04-05, Nitin Mehta ntn...@yahoo.com wrote: We're trying to upgrade our existing MySQL 5.1.26 to MySQL 5.1.68 but the installation gives error:libc.so.6(GLIBC_2.4) is needed by MySQL-server-community-5.1.68-1.rhel5.i386 rtld(GNU_HASH) is needed by MySQL-server-community-5.1.68-1.rhel5.i386 Now, GLIBS2.4 is not available for RHEL4 and MySQL 5.1 and 5.5 are supported on RHEL4 as per this: http://www.mysql.com/support/supportedplatforms/database.html Any ideas? You have apparently taken an RPM for RHEL5 and attempted to use it in RHEL4. It should not be a surprise that it doesn't work. To get it working, either use the correct RPMs (which may not be available), compile from source yourself, or upgrade to RHEL5. --keith -- kkel...@wombat.san-francisco.ca.us -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql
Re: console input
On 2012-06-14, Gary Aitken my...@dreamchaser.org wrote: So... I wanted to read the data line at a time and use a plain INSERT statement. That way I could check for duplicate keys and discover where the duplicate records are. However, I can't find a way to read input from the console or a file. What am I missing? I know I could write a java or C++ program to do this, but it seems like overkill for what should be a trivial task. Actually, what might make more sense is to use un*x command line tools to help. Use cut to extract only the columns of your primary key, use sort (not with -u!) to sort the rows, and use uniq -d to print out only duplicate lines. e.g. cut -f1 mytable.tab | sort | uniq -d It won't tell you which line number(s) are problematic, however; it just tells you which values for your PK are duplicated. If you need the line number use one of the other suggestions. --keith -- kkel...@wombat.san-francisco.ca.us -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql
Re: console input
On 2012-06-14, Gary Aitken my...@dreamchaser.org wrote: So... I wanted to read the data line at a time and use a plain INSERT statement. That way I could check for duplicate keys and discover where the duplicate records are. However, I can't find a way to read input from the console or a file. What am I missing? I know I could write a java or C++ program to do this, but it seems like overkill for what should be a trivial task. I don't know of any stock mysql program that does such a thing. You could write a Perl or Python program for this task; this program would probably be fairly short. --keith -- kkel...@wombat.san-francisco.ca.us -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql
Re: Emergency backup from *.frm *.MYD *.MYI files
On 2012-06-09, Miguel Cardenas renit...@gmail.com wrote: My linux system died due a bad system driver and it does not boot ANYMORE, I am backing up my data files to restore a previous worlking backup of the whole system that DOES NOT INCLUDE THE DATABASES... I hope you will be correcting that in the future! I'm still backing up and will take some time before restore the system, in the mean time I want to know if I can restore the databases from the *.frm *.MYD and *.MYI files, maybe creating the databases again and replace them with the old data files? If they are MyISAM tables, then you should be able to restore most of your tables in this fashion. It depends on how often these tables are written to; if they get writes very frequently then they may be too inconsistent to recover. The basic process is to create the directory (either with CREATE DATABASE or directly on the filesystem; make sure the mysql user can write the directory), then copy the files in to the directory (make sure nobody is doing any writes to the db during this process, and make sure the files are owned by the mysql user when done). This is basically how mysqlhotcopy works--it locks the tables, then copies the raw files to the destination. Your only potential problem is that the tables were open at the time, so changes might not have been written before your crash. Once you have copied the needed files, you should run myisamchk (make sure mysqld is *not* running) on the *.MYI files. --keith -- kkel...@wombat.san-francisco.ca.us -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql
Re: delete syntax
On 2011-12-02, Tim Dunphy bluethu...@jokefire.com wrote: Thanks but I probably should have noted that I only want to delete the wildcard user. There are other users I would prefer to not delete. mysql select user,host from mysql.user where user='mail_admin'; ++---+ | user | host | ++---+ | mail_admin | % | | mail_admin | 127.0.0.1 | | mail_admin | localhost | | mail_admin | localhost.localdomain | ++---+ 4 rows in set (0.00 sec) This is just a regular table with a user and host column. If you wanted to delete the localhost row, you'd do delete from mysql.user where user='mail_admin' and host='localhost'; flush privileges; You'd need to flush privileges because you're munging the user table. But it's probably much better to use the DROP USER command. --keith -- kkeller-use...@wombat.san-francisco.ca.us (try just my userid to email me) AOLSFAQ=http://www.therockgarden.ca/aolsfaq.txt see X- headers for PGP signature information -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql
temp tables rights?
Hi all, Suppose I have a user who has been granted select and create_tmp_table, but no other privileges, on a given database. When I attempt to insert into any temporary table, permission is denied, presumably due to the user not having insert on the database, and no entries in mysql.tables_priv for the new temporary table. Is there an accepted and clean way of allowing users without insert to insert into their own temporary tables? This message http://lists.mysql.com/mysql/156829 from January seems to imply that no such method exists. There are two workarounds: either the one the above message suggests (make the appropriate entries in tables_priv in advance, creating a static allowable set of temporary table names), or grant insert on the database, and then revoke insert on all of the existing tables in the database. This second method seems clunky in two ways: if you subsequently create a new table that shouldn't allow inserts, you need to remember to revoke insert on that table; it also will clutter tables_priv quite a bit. We're using 4.0.17 at the moment; the 4.0.18 and 4.1.1 changelogs don't seem to address this issue. Hopefully I'm wrong, and someone will point out the correct way to do this; if not, what's the preferred alternative? Thanks, --keith -- [EMAIL PROTECTED] alt.os.linux.slackware FAQ: http://wombat.san-francisco.ca.us/cgi-bin/fom -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: server backups
On Fri, Mar 19, 2004 at 11:50:43AM -0500, Charles Hauser wrote: I'm interested in writing a cron job to backup mysql that will: - Backup all the global information first (users and groups, typically) This information is in the mysql database; unlike postgres, there's no concept of ''global'' system tables like pg_*. So you'd use mysqldump, or mysqlhotcopy, or similar on the mysql database just as you'd use them on any other database. - Backup each database independently (not dumpall) You can get a list of databases from a commandline: % mysql --batch -e 'show databases' This is a newline-separated list of databases, which should easily fit into your for loop. --keith -- [EMAIL PROTECTED] alt.os.linux.slackware FAQ: http://wombat.san-francisco.ca.us/cgi-bin/fom -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]