Skip to content

{ Category Archives } MySQL

Backup MySQL with Python

#!/usr/bin/python #purpose: backup mysql database usin mysqldump # date: 05.07.2009 # S.Kraneis import os import time DESTDIR=’/home/kraneis/python/backup/’ USERNAME=’root’ PASSWORD=’testpw’ DATE= time.strftime(“%Y-%m-%d”) DBLIST = [“testdb”] def DUMP_CMD(x): # cmd = “mysqldump –add-drop-table -u %s -p%s %s > %s%s-%s.sql” % (USERNAME,PASSWORD,x,DESTDIR,x,DATE) cmd1 = “mysqldump –add-drop-table -u ” + USERNAME + ” -p” + PASSWORD + ” ” […]

Tagged ,

Joomla installation on Debian Etch

first I have created one Account for joomla useradd -m -c “user joomla” -s /bin/false -g users joomla 1. DOWNLOAD Joomla Copy  de-DE_joomla_lang_full.1.5.10v1.zip   file into a directory /home/joomla # cd /home/Joomla Extract the files e.g. # unzip  de-DE_joomla_lang_full.1.5.10v1.zip

Tagged ,

forget mysql root password

follow this STEPS and reset your root PASSWORD 1.) root@kraneis:~# /usr/bin/mysqld_safe –skip-grant-tables –user=root & [1] 13245 root@kraneis:~# nohup: ignoring input and redirecting stderr to stdout Starting mysqld daemon with databases from /var/lib/mysql mysqld_safe[13287]: started

Tagged

How to create new user in MySQL

% = wildcard (any) Create a new Super-User “GURU” GRANT ALL PRIVILEGES ON *.* TO ‘GURU’@’%’ IDENTIFIED BY ‘abc123’ WITH GRANT OPTION; (root@localhost) [mysql]> select user,host,password from user; +———+———–+——————————– | user    | host      | password                                  | +———+———–+———————————- | root    | localhost | *6691484EA6B50DDDE1926A220 | | root    | suse01    | *6691484EA6B50DDDE1926A22| | replica | %         | […]

Tagged , ,

How to insert the dump file into the database?

uncompressed  dump file “file.sql”  into the example database mysql -u root -p example < /home/mysql/file.sql or for a small files mysql> use example database; mysql> source file.sql (file.sql must be  exist in the current directory)

Replication under MySQL

mysql master slave replication