Tag: mysql

Database Data to Download Variables

Gets data from a MySql database, splits the data into separate columns, then uses one column in a URL to download something – and uses other column to name the file thats downloaded

Install LAMP Stack on Ubuntu/Debian

Install LAMP Stack on Ubuntu/Debian using apt-get sudo apt-get install openssh-server openssh-client apache2 libapache2-mod-php5 php5-cli php5-common php5-cgi mysql-client mysql-common mysql-server…

Executing SQL Query From Command Line

Print out the result of an SQL query directly from the database using the mysql command mysql -u root Project_Tiker…

Import All MySQL Sql Dumps in a Folder

This command will import all the MySQL sql dumps in the current folder. You can use this to restore your…

Stop crond When mysqld is Down

A perl script to stop crond if mysqld is down #!/usr/bin/perl # See if MySQL server is alive or not…

Connecting to a Remote MySQL Host

You can connect to a remote mysql server if you have the necessary permissions… mysql -h mysql.remote.com -u user

Backup All Databases in MySQL

Backup all files in /var/lib/mysql to another folder To restore, stop mysqld if it is running service stop mysqld Move…

Compile and Install LAMP Server from Source – PHP5, Apache2, MySQL5

MySQL ./configure –prefix=/usr/local/mysql –localstatedir=/var/lib/mysql –with-mysqld-user=mysql –with-unix-socket-path=/tmp/mysql.sock –without-comment –without-debug –without-bench make make install cp support-files/my-medium.cnf /etc/my.cnf chown root:sys /etc/my.cnf chmod 644…

MySQL Database Backup/Restore

This command can be used to backup MySQL database. mysqldump -u <User> -p <Database name> [<Table name>] > backup.sql This…