Posts

Showing posts with the label mysql

MySQL Without The Login Prompt

There may be times when you want to use MySQL without the login prompt like when running cron jobs. For that MySQL has something called Option Files wherein you can specify commonly used options so you do not need to enter them in the command line. To use MySQL without the login prompt, create a file in your home directory: touch ~/.my.cnf Modify the file and paste the following configuration: [mysql] user=your_mysql_user password=your_mysql_password You may also specify your configuration for mysqldump so that you can backup files with cron periodically :) [mysqldump] user=my_user password=my_password

Installing MySQL in Fedora

Install MySQL yum -y install mysql mysql-server Enable MySQL service: /sbin/chkconfig mysqld on Start the MySQL server: /sbin/service mysqld start Set the MySQL root password: mysqladmin -u root password 'MyNewPassword123'

Adjust phpMyAdmin Session Timeout

There are 2 ways to adjust the session timeout or expiration: PHPMyAdmin Web Interface 1. Go to Settings → Features 2. Adjust value of Login cookie validity PHPMyAdmin configuration file 1. Locate config.inc.php in /path/to/phpmyadmin/ 2. Adjust the value of this line: $cfg['LoginCookieValidity'] = 3600; /* set the expiration time to 1 hour */ or add $cfg['Servers'][$i]['LoginCookieValidity'] = 3600; Please note that session.gc_maxlifetime might limit session validity and if the session is lost, the login cookie is also invalidated. So it is a good idea to set session.gc_maxlifetime in php.ini

Installing Propel in CodeIgniter

INSTALLING PROPEL IN CODEIGNITER Download CodeIgniter http://ellislab.com/codeigniter Download Propel ORM http://propelorm.org/download.html Inside CodeIgniter application directory, create the following directories: build build/data Note: Anywhere is fine, this is just for organization Unzip Propel ORM, copy the generator directory and rename to propel in application/build/data Copy build.properties-sample from build/data/propel to build/data without the ‘-sample’ Add the following data to build.properties with your own variables propel.project = ci propel.database = mysql propel.database.url = mysql:host=localhost;dbname=demo propel.database.user = root propel.database.password = password Then at the last part of the same file add: propel.project.dir = ${propel.home} propel.output.dir = ${propel.project.dir}/output propel.conf.dir = ${propel.project.dir} propel.sql.dir = ${propel.output.dir}/sql propel.graph.dir = ${propel.output.dir}/graphs propel.omtar.d...