Archive for Ubuntu Server
I was getting the following message when loggin through SSH :
warning: setlocale: LC_CTYPE: cannot change locale (UTF-8)
It complain about the locale variables not being set.
To fix this, simply add the following to ~/.bash_profile:
As default Ubuntu has no password set for the root user. To gain root access you have to type in your own user password. This is the password you set for the first user while installing Ubuntu.
To manually set a password for the root user, type in the following in the shell :
After that you are asked to type in the new root password twice. Finally, your root user has its own password.
E: Dynamic MMap ran out of room. Please increase the size of APT::Cache-Limit. Current value: 25165824. (man 5 apt.conf)
E: Error occurred while processing yatm (NewVersion1)
E: Problem with MergeList /var/lib/apt/lists/mirror.positive-internet.com_debian_dists_squeeze_main_binary-i386_Packages
W: Unable to munmap
E: The package lists or status file could not be parsed or opened.
These errors occur when adding new apt source list.
Add the following line to either /etc/apt/apt.conf or /etc/apt/apt.conf.d/70debconf
Install xdebug for PHP5 in Ubuntu 23.02.12
This is the easy way:
sudo apt-get install php5-xdebug
Change the php.ini:
sudo vi /etc/php5/fpm/php.ini
display_errors = On
html_errors = On
And restart apache/nginx
Backup MySQL Database in Linux 23.02.12
mysqldump –opt -u [uname] -p[pass] [dbname] > [backupfile.sql]
[uname] Your database username
[pass] The password for your database (note there is no space between -p and the password)
[dbname] The name of your database
[backupfile.sql] The filename for your database backup
[–opt] The mysqldump option
To backup a database named ‘Tutorials’ with the username ‘root’ and with no password to a file tut_backup.sql, you should accomplish this command :
mysqldump -u root -p Tutorials > tut_backup.sql
Specify certain tables of your database you want to backup :
mysqldump -u root -p Tutorials php_tutorials asp_tutorials > tut_backup.sql
To back up more that one database at once :
mysqldump -u root -p –databases Tutorials Articles Comments > content_backup.sql
To back up all databases at one time :
mysqldump -u root -p –all-databases > alldb_backup.sql