Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

MySQL database problems : set to read only?

0 views
Skip to first unread message

Phil [re-create-it]

unread,
Mar 14, 2003, 4:52:22 PM3/14/03
to
I have developed a website on one local machine and it works perfectly.

I shifted the whole lot onto my desktop (from the laptop) and installed all
the works from the same release of phptriad so that everything was running
fine.

Then I copied my folders and data from the laptop to the desktop, placing
the folders in the same locations under 'htdocs' and 'mysql' respectively
for the site and the database.

The site is working perfectly (well, as good as the laptop :-) ) but none of
my sql statements containing an UPDATE command will work. I get the 'die'
line from the following statement:

--

$hit_count++;

$sql = "UPDATE articles
SET hit_count = \"$hit_count\"
WHERE article_ID = \"$article_ID\"
";

// $result = @mysql_query($sql,$connection) or die("Couldn't execute query
to increment hit_count!");

--

So, in short - this site works on one local machine and the web server in
the same version. However, it doesn't work on the 2nd local machine.

The only thing that springs to mind is that somehow the MySQL database in
read-only allowing me to perform SELECT but not UPDATE statements. Does
this sound possible? I couldn't find anything in MySQL manual or on Google
that looked helpfull....

TIA
Phil


Arnoud Galactus Engelfriet

unread,
Mar 14, 2003, 5:14:10 PM3/14/03
to
In article <fdsca.341$6f1....@stones.force9.net>,

Phil [re-create-it] <phil@hyphenate|re_create_it.co.uk> wrote:
>The site is working perfectly (well, as good as the laptop :-) ) but none of
>my sql statements containing an UPDATE command will work. I get the 'die'
>line from the following statement:

Can you log into the server and use the 'mysql' client to
manually execute the query? If so, what does the MySQL
server say back?

Alternatively, remove the "@" in the mysql_query statement
so PHP will output the error messages. This way you may
be able to see what the problem is.

Arnoud

--
Arnoud Engelfriet, Dutch patent attorney - Speaking only for myself
Patents, copyright and IPR explained for techies: http://www.iusmentis.com/

Phil [re-create-it]

unread,
Mar 14, 2003, 5:52:51 PM3/14/03
to

"Arnoud "Galactus" Engelfriet" <gala...@stack.nl> wrote in message
news:b4tk7i$17kc$1...@toad.stack.nl...

> In article <fdsca.341$6f1....@stones.force9.net>,
> Phil [re-create-it] <phil@hyphenate|re_create_it.co.uk> wrote:
> >The site is working perfectly (well, as good as the laptop :-) ) but none
of
> >my sql statements containing an UPDATE command will work. I get the
'die'
> >line from the following statement:
>
> Can you log into the server and use the 'mysql' client to
> manually execute the query? If so, what does the MySQL
> server say back?
>
> Arnoud

Thanks Arnoud,

I have just set up phpmyadmin and tried this. I get a reply telling me
"Table 'articles' is read only"
I can't seem to find anything in phpmyadmin (or any other command) telling
my how to make the table have full access.
I have tried TABLE UNLOCK as well as manually checking that the actual file
on the drive is full access - no luck...

Any help/clues appreciated!

Thanks,
Phil


Phil [re-create-it]

unread,
Mar 14, 2003, 6:12:28 PM3/14/03
to

"Phil [re-create-it]" <phil@hyphenate|re_create_it.co.uk> wrote in message
news:b2tca.369$6f1....@stones.force9.net...

Fixed!!

Rather than importing the db into mysql, I simply shortcut and dumped the
data files into the data folder.

Since the tables could be read and SELECT was working, I presumed that all
was good!

Wrong....

However, a dump, create new db and reload the dump has sorted everything out
nicely! I am now up and running....

Hope this helps someone else in future!!!

Phil


0 new messages