Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
hi.
i have installed fedora core 2. i have working php and apache on, but mysql give me some problems:
i can connect to the mysql server with the command "mysql_connect();" but when i try to connect to a database "mysql_select_db("database");" i get a FALSE result.
the scritp that i have tried to use is this:
Are you sure that worked on Windows? It looks like you forgot to pass the id of the mysql_connect command to the mysql_select_db in the arguments for it, like so:
hm...
i have solved the problem setting a username for the database with the command "mysql_permissions" (or something similar) form the shell and connecting to mysql using that username and connecting to that database... but i don't understand WHY on windows i can create select delete databases without setting anything.... really windows is easier than linux...maybe for my work i will use windowd to develop my pages!
i have copmpletely solved my problem:
to create databases freely i have to log to the mysql server as "root" user (mysql_connect("localhost", "root", "")) and then i am free to do what i want...
I'm still curious as to how that worked, as you didn't pass the id of the mysql_connect command. Does it automagically use the last database you connected to?
but i still dont understand WHY on linux i have to connect to mysql as "root" (mysql_connect("localhost", "root", "")) and in windows is not necessary to specify to connect with root user...
Thanks for the link.
Maybe not specifying a username on windows is equivalent to specifying root on linux? It was probably advised against allowing a no-user no-pass system for MySQL on Linux.
yes maybe... surely linux is safer than windows...in fact if i should put the php site i have developed (very simple..but hey man, i have started studying php one week ago..!) on my machine as a server with windows everybody could create databases or delete them...and that's not good!
Well, put simply, a common way to interface with ASP is VBScript, and there's no way i'm going to design a site that only works with Internet Explorer.
I admit I haven't used ASP much, but from what i've read and been told, it allows for the same usage as PHP.
I prefer linux servers for my websites as well as they normally have Cron, g++, and other useful programs, which means no chance for it.
i think the same as you...but usually using linux servers and php is synonimous of "hard"...people think "why i have to spend hours to do a thing on linux when i can do it spending 5 minutes on windows? it's the price to pay for more security...
one more thing:
(for example)
i work for a company who produces php sites. someone tells me to develop a site that interacts with mysql. when i write the site i have to suppose that the databases i will use are already created (by the server administrators) or it is my duty to create databases with my scripts? in other words, it is the programmer's duty to create databases or he has only to interact with these?
maybe you have more experience in this and you can explain how does it work!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.