0

This type of questions have been asked many times before.I have tried almost every answer but can't figure out my problem.

i am having problem in mysql database connectivity in cloud9.io environment in sails js project.

Steps

1)mysql-ctl start

2)phpmyadmin-ctl install

it worked and opened phpmyadmin page for me.i created db there.

3)mysql-ctl cli
4)mysql> \r   

here's the problem its giving

connection id:1

Current database: *** NONE 

There is no error in console while running sails lift.it gives error on executing queries.i have tried all following links related to my problem but no use.

Access denied for user 'root'@'localhost' while attempting to grant privileges. How do I grant privileges?

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

and few more.

Community
  • 1
  • 1
N.A
  • 855
  • 4
  • 13
  • 34
  • Using root and localhost? – Naeem Shaikh Mar 28 '15 at 15:43
  • nope this is the main problem..... host: process.env.IP, User:process.env.C9_USER according to this host is myworkspace-username.c9.io and user should be username. – N.A Mar 29 '15 at 06:10
  • Where are you setting the database name? – Mutahhir Mar 30 '15 at 13:04
  • so sorry that was my mistake i totally ignored the settings for custom queries in waterline sails that uses database configurations too.exports.con = mysql.createConnection( { host :process.env.IP, user :process.env.C9_USER, password : '', database : 'c9' }); exports.createQuery =require('./node_modules/mysql/lib/Connection').createQuery; – N.A Mar 31 '15 at 10:52
  • thanx for everyone's response – N.A Mar 31 '15 at 10:53

0 Answers0