Yii Framework Forum: Koneksi Gii Ke Database Mysql - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Koneksi Gii Ke Database Mysql Rate Topic: -----

#1 User is offline   shabri 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 6
  • Joined: 25-March 13

Posted 25 March 2013 - 02:30 AM

Misi gan..

Mau nanya, ane baru install yii n coba eksplor yii. Ane mau bikin web pake Gii. Udh di set password database di ...\protected\config\main.php dan password buat gii-nya. Tp pas cb masuk ke Gii dan akses Model Connector muncul error gan. Pesan errornya

Quote

CDbException

CDbConnection failed to open the DB connection: SQLSTATE[28000] [1045] Access denied for user 'ODBC'@'localhost' (using password: NO)

C:\xampp\htdocs\yii\framework\gii\generators\model\ModelCode.php(57)


Kira2 itu knp y gan

Mohon petunjuk

Thanks,
0

#2 User is offline   Finzaiko 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 37
  • Joined: 18-November 11
  • Location:Indonesia

Posted 25 March 2013 - 03:29 AM

Udah pasti tuh gan username ato password mysqlnya salah,
coba cek file main.php di folder protected/config/main.php
'db' => array(
'connectionString' => 'mysql:host=localhost;dbname=testdb',
'emulatePrepare' => true,
'username' => 'root',
'password' => 'ini_passwordnya',
'charset' => 'utf8',
),

View Postshabri, on 25 March 2013 - 02:30 AM, said:

Misi gan..

Mau nanya, ane baru install yii n coba eksplor yii. Ane mau bikin web pake Gii. Udh di set password database di ...\protected\config\main.php dan password buat gii-nya. Tp pas cb masuk ke Gii dan akses Model Connector muncul error gan. Pesan errornya


Kira2 itu knp y gan

Mohon petunjuk

Thanks,

0

#3 User is offline   shabri 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 6
  • Joined: 25-March 13

Posted 25 March 2013 - 03:55 AM

Di database ane memang g pake username password gan, jd di main.php sm di console.php ane kosongin username sm password-nya.

Harus pke password-kah databasenya ?

Thanks,
0

#4 User is offline   Finzaiko 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 37
  • Joined: 18-November 11
  • Location:Indonesia

Posted 25 March 2013 - 08:34 PM

Ga harus pke password gan, klo user harus ada, mungkin... usernamenya root n passwordnya kosong coba dulu agan cek lagi username n passwordnya, ato paste aja codenya dsni

View Postshabri, on 25 March 2013 - 03:55 AM, said:

Di database ane memang g pake username password gan, jd di main.php sm di console.php ane kosongin username sm password-nya.

Harus pke password-kah databasenya ?

Thanks,

0

#5 User is offline   santhika 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 10
  • Joined: 04-March 13

Posted 25 March 2013 - 08:48 PM

bisa liat konfigurasi di file main.php nya gan?
0

#6 User is offline   shabri 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 6
  • Joined: 25-March 13

Posted 25 March 2013 - 09:39 PM

Udh bisa gan..

username di main diisi root,

btw kl setting di sqlite di uncomment ngaruh ngga gan ? coz skrg ane uncomment.

Thanks,
0

#7 User is offline   santhika 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 10
  • Joined: 04-March 13

Posted 25 March 2013 - 11:23 PM

sebaik nya di comment aja gan...soal nya g kepake sama sistem nya agan
0

#8 User is offline   banyubening 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 19-February 13

Posted 06 May 2013 - 07:50 PM

bagaimana bila masalhnya seperti ini..
CDbConnection failed to open the DB connection: SQLSTATE[28000] [1045] Access denied for user 'pas'@'localhost' (using password: YES)
padahal main.php sudah disamakan dengan config.phpnya xampp?mohon penjelasan para sesepuh..
0

#9 User is offline   rhigel 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 28
  • Joined: 18-April 13

Posted 09 May 2013 - 04:45 AM

sepertinya berhubungan sama hak akses/privileges di MySQL untuk user 'pas'. coba di tes pake root, kalau lancar berarti privilege 'pas' yg harus dibenerin.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users