Mysql Add User Privileges

Mysql Add User Privileges

This is a quick MySQL snippet that allows me to add user privileges to a MySQL database. The script will create a user first, then it will grant various privileges to that user. CREATE USER 'sqluser'@'%' IDENTIFIED BY 'sqlpassword'; GRANT USAGE ON *.* TO 'sqluser'@'%' IDENTIFIED BY 'sqlpassword' WITH MAX_QUERIES_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 […]

Read More

Mysql-bin files too large – solved

Mysql-bin files too large – solved

Newrelic?is an application monitoring tool that truly is developer’s best friend. It’s such a true statement. ?I’ve used Newrelic to pinpoint and successfully troubleshoot numerous applications. ?I’ve recently switched all database tables from MyISAM to InnoDB for a couple of reasons that are outside the scope of this post. What came to my intention is […]

Read More

Installing Python MySQLdb on OS X Lion

Installing Python MySQLdb on OS X Lion

Tonight I tried installing a Python MySQLdb module, but when I ran the setup I got the following error: sh: mysql_config: command not found Traceback (most recent call last): File "setup.py", line 15, in metadata, options = get_config() File "/Users/markotomic/MySQL-python-1.2.3/setup_posix.py", line 43, in get_config libs = mysql_config("libs_r") File "/Users/markotomic/MySQL-python-1.2.3/setup_posix.py", line 24, in mysql_config raise EnvironmentError("%s […]

Read More

MySQL startup script on Mac OS X Snow Leopard

I’ve had problems starting up MySQL database server on startup on Snow Leopard. ?MySQL preference pane seems to be flaky and it often fails to start MySQL server. I created this startup script myself and it seems to work nicely. sudo nano /System/Library/LaunchDaemons/org.mysql.mysqld.plist <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> […]

Read More

Snow Leopard Gotchas

I recently upgraded to Snow Leopard from 10.5 and everything went relatively smoothly. I was particularly pleased to see extra 13GB of hard drive space. However, I noticed a couple of things that I wasn’t so pleased about: Apache unable to start PHP disabled MySQL unable to start I’ve already walked a couple of people […]

Read More