How to , and other stuff about linux, photo, php … A linux, photography blog. To remember some linux situation, and fix them quickly.

June 11, 2012

How to change MySql root password

Filed under: Linux — Tags: , , — admin @ 2:28 pm

1) Login to mysql server, type the following command at shell prompt:
$ mysql -u root -p
2) Use mysql database (type command at mysql> prompt):
mysql> use mysql;
3) Change password for user root, enter:
mysql> update user set password=PASSWORD("NEWPASSWORD") where User='root';
4) Finally, reload the privileges:
mysql> flush privileges;
mysql> quit

June 8, 2012

A lot of error when try to install ffmpeg

Filed under: Linux — Tags: , , , , — admin @ 11:35 am

Hello
If you ever have one of this bellow error

ERROR: libopenjpeg not found
ERROR: libtheora not found
ERROR: libvorbis not found
ERROR: libxvid not found
ERROR: X11 not found

then you should try this if you are on centos / rhel

yum install libjpeg-devel libtheora-devel xvidcore-devel libX11-devel openjpeg-devel

ERROR: libmp3lame >= 3.98.3 not found

Filed under: Linux — Tags: , , — admin @ 10:29 am

Well if you have this error when you try to install ffmpeg then you must download lame from sourceforge

wget http://downloads.sourceforge.net/project/lame/lame/3.98.4/lame-3.98.4.tar.gz?r=http%3A%2F%2Fffmpeg.zeranoe.com%2Fforum%2Fviewtopic.php%3Ff%3D5%26t%3D94&ts=1339140293&use_mirror=ignum

After
tar -zxvf lame-3.98.4.tar.gz
cd lame-3.98.4
./configure
make
make install

Don’t forget about ldconfig

June 7, 2012

Run a script as a different user

Filed under: Linux — Tags: , , , , — admin @ 12:16 pm

Well if you want to run a script as diferent user you should try to run with su comand.
If you will run like this

su - x -c "/path/script.sh"
after the script is run the su comand return at your user.

June 1, 2012

How to install PHP PECL on CentOS

Filed under: Linux — Tags: , — admin @ 4:56 pm

Hello
Well even you will think you should run yum install php-pecl this is wrong.

You should run
yum install php-pear
to install pecl

Older Posts »

Powered by WordPress