Links
Frequently Asked Questions(FAQ)
Reset Mysql password
/etc/init.d/mysql stop
mysqld_safe –skip-grant-tables
ctrl + shift + t (For new tab in terminal)
mysql
update mysql.users set Password=password('password') where User='root';
exit
switch back to previous terminal and press ctrl + c
/etc/init.d/mysql start
Reset Drupal password
mysql -u root -ppassword
update d7.user set pass=md5('password'), name='admin' where uid=1;
exit
Other Mysql frontends
apt-get install mysql-query-browser mysql-admin
Server hostname: localhost
username : root
password : hello
now click on connect.
Now the Mysql query browser will open, click on the Resultset 1,a plain text editor appears on top of the Resultset 1.
on this plain editor write a query “create database d7” then click on execute.
open Applications > Programming > Mysql Administrator present in Debian Desktop menu
It Opens a Mysql Administrator asking for
Server hostname: Localhost
username : root
password : hello
now click on connect.
Mysql User:
New Password:
Confirm Password:
Click “Schema Privileges” the second tab on the same page
Here a page appears having the database which you created in Schema List click on the database you created
Then a List of Available Privileges will appear on right of that page,click on any one of the available privileges and press ctrl A now all the available privileges are selected now press the arrow ←-
Now click on “Apply Changes”
Your Database is created you can use the Username and database name and password given here in your drupal database.
Check and kill the existing process on the standard port 80(Apache) and 3306(MySQL)
netstat -nlp | grep 80
kill -9 [PID you obtained from netstat output]
How to Uninstall drupal
Unable to find php5-gd or any other debian packages
deb http://ftp.us.debian.org/debian testing main contrib non-free
put # in front of all other lines present in the file
apt-get update
Php5-gd error
Creating multiple sites
You can create multiple sites by uncompressing drupal-7.2.tar.gz into folders like /var/www/drupal, /var/www/swecha or /var/www/your-name, creating a database for each one of them and install the individually
When you create a new menu, a block will be automatically created in Structure > Blocks page. You need to just put the new block in a specific region like Header, Footer, first sidebar or last sidebar
Installing Acquia Marina theme
To have a theme whose layout or specifications can be changed without getting into code, you can install the acquia_marina theme
Download 7 version of acquia_marina & fusion theme from drupal.org and put it under /var/www/d7/sites/all/themes
Download 7 version of skinr from drupal.org and put it under /var/www/d7/sites/all/modules
Resize images
apt-get install gimp
Download a image, right-click and open with GIMP
Goto Tools > Transform tools > Scale
Give required height & width and press Scale
Goto Image > Autocrop Image
save and exit GIMP
Migration of drupal
mysqldump -uroot -ppassword d7 > /var/www/d7/mysql-dump.sql
Compress /var/www/d7 and take it to your friend's PC and put it in /var/www
Uncompress files, import the .sql file into phpmyadmin
edit the /var/www/d7/sites/default/settings.php file and update the username & password in a line which looks like
mysql://root:[email protected]/d7
with the mysql username & password of the new system and check using http://localhost/d7
Easiest website hosting for testing purposes
Create a account using dyndns.org
After logging in, create a dynamic host
Check your system ip and put it in the configuration
Whenever anyone request the dynamic host name you created, the apache server will serve the local instances to the host name.
Links