Solusi Can’t create database (errno: 13) pada MySQL

Secara default data mysql tersimpan di /var/lib/mysql , namun karena alasan kemudahan backup dan kapasitas saya mengubahnya di partisi lain yang termount di /mysqldata/. Untuk keperluan tersebut saya menjalankan perintah berikut:

sed -i 's/datadir=\/var\/lib\/mysql/datadir=\/ripanel\/mysqldata/g' /etc/my.cnf
mkdir -p /mysqldata
/etc/init.d/mysqld stop
cp -rap /var/lib/mysql/* /mysqldata
chown mysql.mysql /mysqldata 
/etc/init.d/mysqld start

» Read more

Cara Install Virtualbox di CentOS 6.x

[root@centos ~]# cd /usr/src/kernels/
[root@centos kernels]# ls
2.6.32-504.el6.i686
[root@centos kernels]# export KERN_DIR=/usr/src/kernels/2.6.32-504.el6.i686
[root@centos kernels]# service vboxdrv setup
Stopping VirtualBox kernel modules [ OK ]
Removing old VirtualBox pci kernel module [ OK ]
Removing old VirtualBox netadp kernel module [ OK ]
Removing old VirtualBox netflt kernel module [ OK ]
Removing old VirtualBox kernel module [ OK ]
Recompiling VirtualBox kernel modules [ OK ]
Starting VirtualBox kernel modules [ OK ]
[root@centos kernels]#

Cara Update Kernel di Centos

[root@centos ~]# yum update kernel
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Update Process
Loading mirror speeds from cached hostfile
 * base: mirror.vastspace.net
 * epel: ftp.cuhk.edu.hk
 * extras: mirror.vodien.com
 * updates: centos.mirror.secureax.com
Resolving Dependencies
--> Running transaction check
---> Package kernel.i686 0:2.6.32-504.3.3.el6 will be installed
--> Processing Dependency: kernel-firmware >= 2.6.32-504.3.3.el6 for package: kernel-2.6.32-504.3.3.el6.i686
--> Running transaction check
---> Package kernel-firmware.noarch 0:2.6.32-504.el6 will be updated
---> Package kernel-firmware.noarch 0:2.6.32-504.3.3.el6 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package              Arch        Version                    Repository    Size
================================================================================
Installing:
 kernel               i686        2.6.32-504.3.3.el6         updates       27 M
Updating for dependencies:
 kernel-firmware      noarch      2.6.32-504.3.3.el6         updates       14 M

Transaction Summary
================================================================================
Install       1 Package(s)
Upgrade       1 Package(s)

Total download size: 41 M
Is this ok [y/N]: y
Downloading Packages:
(1/2): kernel-2.6.32-504.3.3.el6.i686.rpm                |  27 MB     04:49     
(2/2): kernel-firmware-2.6.32-504.3.3.el6.noarch.rpm     |  14 MB     05:13     
--------------------------------------------------------------------------------
Total                                            69 kB/s |  41 MB     10:11     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Updating   : kernel-firmware-2.6.32-504.3.3.el6.noarch                    1/3 
  Installing : kernel-2.6.32-504.3.3.el6.i686                               2/3 
  Cleanup    : kernel-firmware-2.6.32-504.el6.noarch                        3/3 
  Verifying  : kernel-2.6.32-504.3.3.el6.i686                               1/3 
  Verifying  : kernel-firmware-2.6.32-504.3.3.el6.noarch                    2/3 
  Verifying  : kernel-firmware-2.6.32-504.el6.noarch                        3/3 

Installed:
  kernel.i686 0:2.6.32-504.3.3.el6                                              

Dependency Updated:
  kernel-firmware.noarch 0:2.6.32-504.3.3.el6                                   

Complete!
[root@centos ~]#

locate, Cara Mencari Files dan Folder di Linux dengan Cepat

Pernahkah kita melakukan pencarian file/ folder di Windows mengunakan search files and folder? Prosesnya sangat lama kan? apalagi HDD kita besar. Nah jika di linux pencarian file seperti ini sangat cepat dengan menggunakan mlocate.

Pencarian menggunakan mlocate ini sangat cepat karena mlocate merupakan program database list semua files dan folder yang ada di linux. Program semacam ini jika di Windows 98/ME/NT4/2000/XP/Vista/7 bisa menggunakan Locate32 buatan Janne Huttunen. » Read more

Cara Install MySQL 5 di Debian

Kali ini saya install MySQL 5

Caranya sangat mudah menggunakan apt-get dari terminal

sudo apt-get install mysql-server

Tampilan prosesnya seperti ini:

antorij@debian6:~$ su
Password: 
root@debian6:/home/antorij# sudo apt-get install mysql-server
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  libdbd-mysql-perl libdbi-perl libhtml-template-perl libmysqlclient16
  libnet-daemon-perl libplrpc-perl mysql-client-5.1 mysql-common
  mysql-server-5.1 mysql-server-core-5.1
Suggested packages:
  libipc-sharedcache-perl libterm-readkey-perl tinyca
The following NEW packages will be installed:
  libdbd-mysql-perl libdbi-perl libhtml-template-perl libmysqlclient16
  libnet-daemon-perl libplrpc-perl mysql-client-5.1 mysql-common mysql-server
  mysql-server-5.1 mysql-server-core-5.1
0 upgraded, 11 newly installed, 0 to remove and 228 not upgraded.
Need to get 22.2 MB/23.3 MB of archives.
After this operation, 54.7 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://security.debian.org/ squeeze/updates/main mysql-common all 5.1.73-1 [71.2 kB]
Get:2 http://security.debian.org/ squeeze/updates/main libmysqlclient16 i386 5.1.73-1 [1,927 kB]
Get:3 http://security.debian.org/ squeeze/updates/main mysql-client-5.1 i386 5.1.73-1 [9,615 kB]
Media change: please insert the disc labeled                                   
 'Debian GNU/Linux 6.0.3 _Squeeze_ - Official i386 DVD Binary-1 20111008-13:01'
in the drive '/media/cdrom/' and press enter

Media change: please insert the disc labeled                                   
 'Debian GNU/Linux 6.0.3 _Squeeze_ - Official i386 DVD Binary-1 20111008-13:01'
in the drive '/media/cdrom/' and press enter

Media change: please insert the disc labeled                                   
 'Debian GNU/Linux 6.0.3 _Squeeze_ - Official i386 DVD Binary-1 20111008-13:01'
in the drive '/media/cdrom/' and press enter

Get:4 http://security.debian.org/ squeeze/updates/main mysql-server-core-5.1 i386 5.1.73-1 [3,955 kB]
Get:5 http://security.debian.org/ squeeze/updates/main mysql-server-5.1 i386 5.1.73-1 [6,543 kB]
Get:6 http://security.debian.org/ squeeze/updates/main mysql-server all 5.1.73-1 [65.7 kB]
Fetched 22.2 MB in 4min 1s (91.8 kB/s)                                         
Preconfiguring packages ...
Selecting previously deselected package mysql-common.
(Reading database ... 127614 files and directories currently installed.)
Unpacking mysql-common (from .../mysql-common_5.1.73-1_all.deb) ...
Selecting previously deselected package libnet-daemon-perl.
Unpacking libnet-daemon-perl (from .../libnet-daemon-perl_0.43-1_all.deb) ...
Selecting previously deselected package libplrpc-perl.
Unpacking libplrpc-perl (from .../libplrpc-perl_0.2020-2_all.deb) ...
Selecting previously deselected package libdbi-perl.
Unpacking libdbi-perl (from .../libdbi-perl_1.612-1_i386.deb) ...
Selecting previously deselected package libmysqlclient16.
Unpacking libmysqlclient16 (from .../libmysqlclient16_5.1.73-1_i386.deb) ...
Selecting previously deselected package libdbd-mysql-perl.
Unpacking libdbd-mysql-perl (from .../libdbd-mysql-perl_4.016-1_i386.deb) ...
Selecting previously deselected package mysql-client-5.1.
Unpacking mysql-client-5.1 (from .../mysql-client-5.1_5.1.73-1_i386.deb) ...
Selecting previously deselected package mysql-server-core-5.1.
Unpacking mysql-server-core-5.1 (from .../mysql-server-core-5.1_5.1.73-1_i386.deb) ...
Processing triggers for man-db ...
Setting up mysql-common (5.1.73-1) ...
Selecting previously deselected package mysql-server-5.1.
(Reading database ... 127990 files and directories currently installed.)
Unpacking mysql-server-5.1 (from .../mysql-server-5.1_5.1.73-1_i386.deb) ...
Selecting previously deselected package libhtml-template-perl.
Unpacking libhtml-template-perl (from .../libhtml-template-perl_2.9-2_all.deb) ...
Selecting previously deselected package mysql-server.
Unpacking mysql-server (from .../mysql-server_5.1.73-1_all.deb) ...
Processing triggers for man-db ...
Setting up libnet-daemon-perl (0.43-1) ...
Setting up libplrpc-perl (0.2020-2) ...
Setting up libdbi-perl (1.612-1) ...
Setting up libmysqlclient16 (5.1.73-1) ...
Setting up libdbd-mysql-perl (4.016-1) ...
Setting up mysql-client-5.1 (5.1.73-1) ...
Setting up mysql-server-core-5.1 (5.1.73-1) ...
Setting up mysql-server-5.1 (5.1.73-1) ...
Stopping MySQL database server: mysqld.
141225  5:39:06 [Note] Plugin 'FEDERATED' is disabled.
141225  5:39:06  InnoDB: Initializing buffer pool, size = 8.0M
141225  5:39:06  InnoDB: Completed initialization of buffer pool
141225  5:39:06  InnoDB: Started; log sequence number 0 44233
141225  5:39:06  InnoDB: Starting shutdown...
141225  5:39:12  InnoDB: Shutdown completed; log sequence number 0 44233
Starting MySQL database server: mysqld.
Checking for corrupt, not cleanly closed and upgrade needing tables..
Setting up libhtml-template-perl (2.9-2) ...
Setting up mysql-server (5.1.73-1) ...
root@debian6:/home/antorij#

Setelah proses install selesai untuk mejalankan MySQL gunakancara berikut:

root@debian6:/home/antorij# /etc/init.d/mysql start
 Starting MySQL database server: mysqld.
 Checking for corrupt, not cleanly closed and upgrade needing tables..
 root@debian6:/home/antorij# /etc/init.d/mysql restart
 Stopping MySQL database server: mysqld.
 Starting MySQL database server: mysqld.
 Checking for corrupt, not cleanly closed and upgrade needing tables..
 root@debian6:/home/antorij# /etc/init.d/mysql reload
 Reloading MySQL database server: mysqld.
 root@debian6:/home/antorij# /etc/init.d/mysql force-reload
 Reloading MySQL database server: mysqld.
 root@debian6:/home/antorij# /etc/init.d/mysql status
 /usr/bin/mysqladmin Ver 8.42 Distrib 5.1.73, for debian-linux-gnu on i486
 Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
 affiliates. Other names may be trademarks of their respective
 owners.

Server version 5.1.73-1
 Protocol version 10
 Connection Localhost via UNIX socket
 UNIX socket /var/run/mysqld/mysqld.sock
 Uptime: 31 sec

Threads: 1 Questions: 104 Slow queries: 0 Opens: 99 Flush tables: 1 Open tables: 23 Queries per second avg: 3.354.
 root@debian6:/home/antorij# /etc/init.d/mysql stop
 Stopping MySQL database server: mysqld.
 root@debian6:/home/antorij#

Mengatasi Error phpMyAdmin: Cannot start session without errors pada php-fpm 5

Pagi ini saya baru saya install php-fpm 5.3.3 dan phpMyAdmin dari repositori remi/epel/rpmfusion. Ketika membuka halaman phpMyAdmin menampilkan pesan error berikut:

phpMyAdmin – Error

Cannot start session without errors, please check errors given in your PHP and/or webserver log file and configure your PHP installation properly.

Sepertinya error tersebut diakibatkan php tidak dapat menulis session karena permasalah keberadaan dan permisi pada direktori /var/lib/php/session. » Read more

1 2 3 4