Composite key as foreign key (sql)

Per the mySQL documentation you should be able to set up a foreign key mapping to composites, which will require you to create the multiple columns. Add the columns and put this in your group table FOREIGN KEY (`beggingTime`,`day`,`tutorId`) REFERENCES tutorial(`beggingTime`,`day`,`tutorId`) As Steven has alluded to in the below comments, you SHOULD try to re-architect … Read more

phpmyadmin automatic logout time

Changing php.ini will change the session duration for all the websites running on the server. To change it just for PhpMyAdmin, open config.inc.php and add: $sessionDuration = 60*60*24*7; // 60*60*24*7 = one week ini_set(‘session.gc_maxlifetime’, $sessionDuration); $cfg[‘LoginCookieValidity’] = $sessionDuration;

MySQL said: Documentation #1045 – Access denied for user ‘root’@’localhost’ (using password: NO)

I had this problem after changing the password for the root user in phpMyAdmin. I know nothing about programming but I solved it by doing the following: Go to file C:\wamp\apps\phpmyadmin3.2.0.1\config.inc.php (I guess you would replace “wamp” with the name of your server if you’re not using Wamp Server) Find the line $cfg[‘Servers’][$i][‘password’]=” and change … Read more

phpMyAdmin is throwing a #2002 cannot log in to the mysql server phpmyadmin

If you’re getting the #2002 Cannot log in to the MySQL server error while logging in to phpmyadmin, try editing phpmyadmin/config.inc.php and change: $cfg[‘Servers’][$i][‘host’] = ‘localhost’; to: $cfg[‘Servers’][$i][‘host’] = ‘127.0.0.1’; Solution from Ryan’s blog Edit (20-Mar-2015): Note that if you’re on a fresh install, config.inc.php may not exist. You need to rename / copy config.sample.inc.php … Read more