/tmp/mysql.sock file not found
second sets a symbolic link to the sock so Rails' default location for the sock is cool
mysql_config --socket sudo ln -s /var/run/mysqld/mysqld.sock /tmp/mysql.sock
2807 users tagging and storing useful source code snippets
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)
mysql_config --socket sudo ln -s /var/run/mysqld/mysqld.sock /tmp/mysql.sock
mysql> GRANT ALL PRIVILEGES ON *.* TO 'monty'@'localhost' -> IDENTIFIED BY 'some_pass' WITH GRANT OPTION;
mysql -h localhost -u root mysql> USE mysql; mysql> UPDATE user SET Password=PASSWORD('root-pwd') WHERE user='root'; mysql> FLUSH PRIVILEGES; mysql> EXIT
<?xml version="1.0" encoding="UTF-8"?> DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Labelkey>com.mysql.MySQL< /string> <key>LowPriorityIOkey>/> <key>ProgramArgumentskey> /usr/local/mysql/bin/mysqld_safestring> </array> <key>RunAtLoadkey> /> dict> </plist>
ssh -2 -f -C -N user@servername.com -L 3307/127.0.0.1/3306
show create table <table_name>
mysqldump -u <username> -p -q --single-transaction <db_name> > <backup_filename>
mysql -u <username> -p <db_name> < <backup_filename>
mysqldump -u <username> -p -q --single-transaction -t <db_name> > <backup_filename>
mysql -u <username> -p <db_name> < <backup_filename>
No forking in background and verbose ssh -2 -v -c blowfish -C -N user@servername.textdrive.com -L 3370/127.0.0.1/3306 Forking in background ssh -2 -f -c blowfish -C -N user@servername.textdrive.com -L 3370/127.0.0.1/3306
mysqldump -u dbname -p username --skip-opt -B --tables wp_categories wp_comments wp_link2cat wp_links wp_options wp_post2cat wp_postmeta wp_posts wp_usermeta wp_users > wordpress.sql
ssh -f -L 3306:127.0.0.1:3306 username@servername.com sleep 120
grant select, update, create, insert, delete on database.* to username@localhost identified by ‘password‘;
mysqldump -u root -p database > filename.sql
mysql -u root -p database < filename.sql
mysqldump familyman_development -u familyman -p -d --skip-opt
# Have to do this via my Mac because of all the mirror servers # I use scp to copy from Mac to FreeBSD box # Downloaded into /usr/local/src/taballs: - php-5.2.0.tar.bz2 from http://www.php.net/downloads.php - mysql-5.0.27.tar.gz from http://dev.mysql.com/downloads/mysql/5.0.html#downloads # On FreeBSD box cd /usr/local/src cd tarballs fetch http://mirrors.cat.pdx.edu/lighttpd/lighttpd-1.4.13.tar.gz cd .. tar xzvf tarballs/php-5.2.0.tar.bz2 tar zxvf tarballs/mysql-5.0.27.tar.gz tar zxvf tarballs/lighttpd-1.4.13.tar.gz MySQL first ======================================================= # Shut down MySQL: /usr/local/mysql/bin/mysqladmin -u root -p shutdown cd mysql-5.0.27 ./configure --prefix=/usr/local/mysql \ --localstatedir=/usr/local/mysql/data \ --enable-assembler \ --with-mysqld-ldflags=-all-static CFLAGS="-O3" CXX=gcc CXXFLAGS="-O3 \ -felide-constructors -fno-exceptions -fno-rtti" # Change to root su # I like to run the process in the background (&), # redirect the output to a log file, # and tail -f the log file. # Make it: make > ~/mysql_make.log & # Watch the make: tail -f ~/mysql_make.log # Install it: make install > ~/mysql_install.log & # Watch the install: tail -f ~/mysql_install.log PHP as a CGI: ===================================================================== cd /usr/local/src/php-5.2.0 # Make sure curl is where we think it is locate curl | grep include # Configure it ./configure --with-xml --with-zlib --with-mysql=/usr/local/mysql \ --with-mysqli=/usr/local/mysql/bin/mysql_config \ --with-curl=/usr/local/include \ --enable-cgi --enable-fastcgi \ --enable-force-redirect \ > ~/phpconfig.log & tail -f ~/phpconfig.log # Edit the Makefile to eliminate duplicates in the EXTRA_LIBS line pico Makefile # New: EXTRA_LIBS = -lcrypt -lmysqlclient -liconv -lcurl -lz -lm -lxml2 -lssl -lcrypto # Make it make > ~/php_make.log & tail -f ~/php_make.log # Install it make install > ~/php_install.log & tail -f ~/php_install.log LightTPD: ================================================================= # Check requirements locate libpcre locate libz # If those aren't there, find them in ports and install cd /usr/local/src/lighttpd-1.4.11 ./configure --prefix=/usr/local --with-pcre=/usr/local # Make it make > ~/lighttpd_make.log & tail -f ~/lighttpd_make.log # Install it make install > ~/lighttpd_install.log & tail -f ~/lighttpd_install.log # Start MySQL /usr/local/etc/rc.d/mysql.server.sh start @HOSTNAME@: not found @HOSTNAME@: not found Starting MySQL. SUCCESS! # Check MySQL version /usr/local/mysql/bin/mysqladmin -v /usr/local/mysql/bin/mysqladmin Ver 8.41 Distrib 5.0.27, for unknown-freebsd6.0 on i386 # Add mysql to the path for root. cd pico .cshrc set path = (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin /usr/local/bin /usr/X11R6/bin $HOME/bin) becomes set path = (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin /usr/local/bin /usr/X11R6/bin $HOME/bin /usr/local/mysql/bin) # Use the lighttpd.conf file I have posted separately # Requires use of /var/log/lighttpd log directory mkdir /var/log/lighttpd chmod 777 /var/log/lighttpd # Test the server? lighttpd -f /usr/local/etc/lighttpd.conf ps ax | grep light 59463 ?? S 0:00.02 lighttpd -f /usr/local/etc/lighttpd.conf 59537 p0 R+ 0:00.00 grep light # To shut off the server # pid file is in /var/run/lighttpd.pid
<html> <head> <script type="text/javascript" src="modul - clock.php">script> "".date("d-m-Y")."<br>".date("H:i:s").""; /*NECESAR pentru a inlocui delay-ul pana ce se incarca script-ul*/?> "clock" style="position:relative;">=$time;?>