Reputation
220
Top tag
Next privilege 250 Rep.
View close votes
Badges
1 3 10
Impact
~23k people reached

  • 0 posts edited
  • 0 helpful flags
  • 17 votes cast
Apr
17
comment Are certain environment variables required for mysql login-path?
So, in a sense, you are right that mysqldump needs a user and password, but the --login-path is supposed to supply it and it's not working in the cron.
Apr
17
comment Are certain environment variables required for mysql login-path?
Actually, I have to clarify the error. The user that is denied is the system "linuxuser", but the user specified in --login-path=local directive would be a mysql user and the password IS specified there. When I run the script from the terminal, the mysql user/password are passed in, but it seems like they are not when run from CRON. So mysql, I think, defaults to the current system user ("linuxuser" is specified in the cron), and no password is supplied. --login-path is not working in the cron.
Apr
17
comment Are certain environment variables required for mysql login-path?
mysqldump needs -u and -p for some mysql "user". Um, no it doesn't? As I said, the script works when run from the command line. It only fails in cron. Are you familiar with --login-path=local ?
Apr
17
asked Are certain environment variables required for mysql login-path?
Jan
15
asked MySQL GROUP BY performance not improved by 1-column vs 2-column condition
Dec
23
comment How do you mysqldump specific table(s)?
@codecowboy, you can change SQL="${SQL} AND table_name NOT IN ('t1','t2','t3')" to SQL="${SQL} AND table_name NOT LIKE 'foo\_%'". I just tested it and it works. You could change the condition to '%foo%' to get all tables containing 'foo' anywhere in their names (including 'food', 'fool', etc).
Dec
18
comment Optimizing “Removing duplicates” thread state
If the intermediate state results in a lot of rows with no index, then MySQL would have to do a full table scan to remove duplicates, which would take a long time. I am having the same issue and I will need to see if adding an index to a table would help, or if I have to rewrite my query in some way.
Nov
28
awarded  Popular Question
Oct
13
awarded  Famous Question
Aug
24
comment How large should be mysql innodb_buffer_pool_size?
Some people suggest that IOs over 200 are too much unless you have an SSD with much faster write speed. I don't know if they are correct. chriscalender.com/iops-innodb_io_capacity-and-the-innodb-plugin
Aug
15
revised Subqueries run very fast individually, but when joined are very slow
added an update about the query's speed with a larger number of rows
Aug
8
awarded  Notable Question
Jul
28
comment Are individual queries faster than joins?
I agree with everything Jon is saying. If you are going to do multiple selects then you can maintain consistency in MySQL by using table or row locks, which I'm sure every major RDBMS can do. In the ORM I'm working on now, there are builder objects that wire things like customer and invoice. If I'm looking at a customer view, it will use a query that gets invoices for that customer using invoices::getBy('customer_id',$cust_id) or something like that. The executed query would be a simple join.
Apr
24
awarded  Tumbleweed
Apr
17
comment What is the best way to manage user access to MySQL via PHP?
As Leonard has said, you should limit the types of queries different users can make. Don't give write access, or ALTER TABLE access, to users that only need to read data.
Feb
11
comment Preordering the table by a specified column
I couldn't figure out why my InnoDB table was not ordered by its primary key until I saw this answer. I thought it was called a "composite index" rather than "clustered index," but either way I now see that the table is ordered by my 2nd column, which is part of such an index (along with column 3).
Jan
30
awarded  Yearling
Jan
9
awarded  Popular Question
Jul
23
comment How can I speed up “show columns” on MySQL?
+1 for putting [mysqld] there. It might be obvious to many that this setting would go under mysqld, but may not be obvious for those who would ask this question. By the way, this sped up SELECT COUNT(*) on one of my information_schema tables to 6 seconds from over a minute. Still slow, but a huge improvement.
Jul
3
comment Mysql Innodb: InnoDB: ERROR: the age of the last checkpoint is InnoDB: which exceeds the log group capacity
Wouldn't it be advisable to copy the ib_logfile* to another location for backup before deleting them?