On Ubuntu following works -
Run:
sudo dpkg-reconfigure mysql-server-5.1
Now this will allow you set password for 'root' user.
Les assume you want to create user joe and create database joedb , want to
assign password 'joepassword'
Now login to the mysql as:
mysql -u root -p'root-password'
select PASSWORD('joepassword');
-- Note down string that is displayed here.
drop user joe@localhost;
grant all privileges on *.* to joe@localhost with grant option;
create user 'joe'@'localhost' IDENTIFIED BY PASSWORD '.......';
-- Enter password you got by running select password('joedb')
command where ... is
create database joedb character set utf8;
Now you can login as:
mysql -u joe -p'joepassword' -D joedb
Now you can use joe, joedb, joepassword in your settings file to use mysql
as backend.
-Subodh
On Sat, Jan 5, 2013 at 7:41 AM, ANKIT BAGARIA <[email protected]>wrote:
> I have installed mysql as databse and i am not able to create a database.
> I know the command for it but dont know where to type it. Django tutorials
> tell to run the command in database interactive. But I am not able to
> figure out how to to so. Please help me in creating a database.
> Thankyou.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/rXKRbmFTED0J.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.